Skip to content

Commit 31850fa

Browse files
authored
[gn] remove goma configs (#93941)
goma is deprecated and not maintained anymore.
1 parent e325e2e commit 31850fa

File tree

3 files changed

+3
-35
lines changed

3 files changed

+3
-35
lines changed

llvm/utils/gn/build/BUILD.gn

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,6 @@ config("compiler_defaults") {
266266
]
267267
}
268268
}
269-
if (is_clang && use_goma) {
270-
# goma converts all paths to lowercase on the server, breaking this
271-
# warning.
272-
cflags += [ "-Wno-nonportable-include-path" ]
273-
}
274269
}
275270

276271
# On Windows, the linker is not invoked through the compiler driver.
@@ -373,9 +368,6 @@ config("compiler_defaults") {
373368
if (sysroot != "" && current_os != "win" && is_clang) {
374369
cflags += [ "-Wpoison-system-directories" ]
375370
}
376-
assert(
377-
!use_goma || sysroot != "",
378-
"goma needs a sysroot: run `llvm/utils/sysroot.py make-fake --out-dir=sysroot` and add `sysroot = \"//sysroot\"` to your args.gn")
379371

380372
if (use_ubsan) {
381373
assert(is_clang && (current_os == "ios" || current_os == "linux" ||

llvm/utils/gn/build/toolchain/BUILD.gn

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import("//llvm/utils/gn/build/toolchain/compiler.gni")
22

3-
assert(!use_goma || goma_dir != "",
4-
"set `goma_dir` to the output of `goma_ctl goma_dir` in your args.gn")
5-
assert(!use_goma || compiler_wrapper == "",
6-
"`use_goma` and `compiler_wrapper` are mutually exclusive")
7-
83
unix_copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})"
94

105
template("unix_toolchain") {
@@ -23,11 +18,8 @@ template("unix_toolchain") {
2318
cxx = rebase_path(clang_base_path, root_build_dir) + "/bin/clang++"
2419
}
2520

26-
ld = cxx # Don't use goma wrapper for linking.
27-
if (use_goma) {
28-
cc = "$goma_dir/gomacc $cc"
29-
cxx = "$goma_dir/gomacc $cxx"
30-
} else if (compiler_wrapper != "") {
21+
ld = cxx # Don't use compiler wrapper for linking.
22+
if (compiler_wrapper != "") {
3123
cc = "$compiler_wrapper $cc"
3224
cxx = "$compiler_wrapper $cxx"
3325
}
@@ -195,7 +187,6 @@ template("stage2_unix_toolchain") {
195187
forward_variables_from(invoker.toolchain_args, "*")
196188

197189
clang_base_path = root_build_dir
198-
use_goma = false
199190
}
200191

201192
deps = [
@@ -301,9 +292,7 @@ template("win_toolchain") {
301292
}
302293
}
303294

304-
if (use_goma) {
305-
cl = "$goma_dir/gomacc $cl"
306-
} else if (compiler_wrapper != "") {
295+
if (compiler_wrapper != "") {
307296
cl = "$compiler_wrapper $cl"
308297
}
309298

@@ -425,7 +414,6 @@ win_toolchain("stage2_win_x64") {
425414
sysroot = win_sysroot
426415
}
427416
clang_base_path = root_build_dir
428-
use_goma = false
429417
}
430418
deps = [
431419
"//:clang($host_toolchain)",
@@ -442,7 +430,6 @@ win_toolchain("stage2_win_x86") {
442430
sysroot = win_sysroot
443431
}
444432
clang_base_path = root_build_dir
445-
use_goma = false
446433
}
447434
deps = [
448435
"//:clang($host_toolchain)",

llvm/utils/gn/build/toolchain/compiler.gni

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
declare_args() {
2-
# Whether to use goma (https://chromium.googlesource.com/infra/goma/client/)
3-
use_goma = false
4-
5-
# If is_goma is true, the location of the goma client install.
6-
# Set this to the output of `goma_ctl goma_dir`.
7-
goma_dir = ""
8-
92
# If set, this is prepended to compile action command lines (e.g. `"ccache"`).
10-
# Cannot be used with use_goma/goma_dir.
113
compiler_wrapper = ""
124

135
# Set this to a clang build directory. If set, that clang is used as compiler.
14-
# goma only works with compiler binaries it knows about, so useful both for
15-
# using a goma-approved compiler and for compiling clang with a locally-built
16-
# clang in a different build directory.
176
# On Windows, setting this also causes lld-link to be used as linker.
187
# Example value: getenv("HOME") + "/src/llvm-build/Release+Asserts"
198
clang_base_path = ""

0 commit comments

Comments
 (0)