[llvm] remove goma configs from GN build (PR #93941)
Takuto Ikuta via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 02:12:40 PDT 2024
https://github.com/atetubou created https://github.com/llvm/llvm-project/pull/93941
goma is deprecated and we don't maintain goma anymore.
>From 5d5b44486b7c3bde49076f95b03db240471c84b0 Mon Sep 17 00:00:00 2001
From: Takuto Ikuta <tikuta at google.com>
Date: Fri, 31 May 2024 18:10:56 +0900
Subject: [PATCH] remove goma configs from GN
---
llvm/utils/gn/build/BUILD.gn | 8 --------
llvm/utils/gn/build/toolchain/BUILD.gn | 19 +++----------------
llvm/utils/gn/build/toolchain/compiler.gni | 11 -----------
3 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn
index 16af242979581..b44f8b5d86f1c 100644
--- a/llvm/utils/gn/build/BUILD.gn
+++ b/llvm/utils/gn/build/BUILD.gn
@@ -266,11 +266,6 @@ config("compiler_defaults") {
]
}
}
- if (is_clang && use_goma) {
- # goma converts all paths to lowercase on the server, breaking this
- # warning.
- cflags += [ "-Wno-nonportable-include-path" ]
- }
}
# On Windows, the linker is not invoked through the compiler driver.
@@ -373,9 +368,6 @@ config("compiler_defaults") {
if (sysroot != "" && current_os != "win" && is_clang) {
cflags += [ "-Wpoison-system-directories" ]
}
- assert(
- !use_goma || sysroot != "",
- "goma needs a sysroot: run `llvm/utils/sysroot.py make-fake --out-dir=sysroot` and add `sysroot = \"//sysroot\"` to your args.gn")
if (use_ubsan) {
assert(is_clang && (current_os == "ios" || current_os == "linux" ||
diff --git a/llvm/utils/gn/build/toolchain/BUILD.gn b/llvm/utils/gn/build/toolchain/BUILD.gn
index ebcdcbf6f61e1..8fd05e84a2db1 100644
--- a/llvm/utils/gn/build/toolchain/BUILD.gn
+++ b/llvm/utils/gn/build/toolchain/BUILD.gn
@@ -1,10 +1,5 @@
import("//llvm/utils/gn/build/toolchain/compiler.gni")
-assert(!use_goma || goma_dir != "",
- "set `goma_dir` to the output of `goma_ctl goma_dir` in your args.gn")
-assert(!use_goma || compiler_wrapper == "",
- "`use_goma` and `compiler_wrapper` are mutually exclusive")
-
unix_copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})"
template("unix_toolchain") {
@@ -23,11 +18,8 @@ template("unix_toolchain") {
cxx = rebase_path(clang_base_path, root_build_dir) + "/bin/clang++"
}
- ld = cxx # Don't use goma wrapper for linking.
- if (use_goma) {
- cc = "$goma_dir/gomacc $cc"
- cxx = "$goma_dir/gomacc $cxx"
- } else if (compiler_wrapper != "") {
+ ld = cxx # Don't use compiler wrapper for linking.
+ if (compiler_wrapper != "") {
cc = "$compiler_wrapper $cc"
cxx = "$compiler_wrapper $cxx"
}
@@ -195,7 +187,6 @@ template("stage2_unix_toolchain") {
forward_variables_from(invoker.toolchain_args, "*")
clang_base_path = root_build_dir
- use_goma = false
}
deps = [
@@ -301,9 +292,7 @@ template("win_toolchain") {
}
}
- if (use_goma) {
- cl = "$goma_dir/gomacc $cl"
- } else if (compiler_wrapper != "") {
+ if (compiler_wrapper != "") {
cl = "$compiler_wrapper $cl"
}
@@ -425,7 +414,6 @@ win_toolchain("stage2_win_x64") {
sysroot = win_sysroot
}
clang_base_path = root_build_dir
- use_goma = false
}
deps = [
"//:clang($host_toolchain)",
@@ -442,7 +430,6 @@ win_toolchain("stage2_win_x86") {
sysroot = win_sysroot
}
clang_base_path = root_build_dir
- use_goma = false
}
deps = [
"//:clang($host_toolchain)",
diff --git a/llvm/utils/gn/build/toolchain/compiler.gni b/llvm/utils/gn/build/toolchain/compiler.gni
index 10ebc8b3bab83..ed81b2cb028b7 100644
--- a/llvm/utils/gn/build/toolchain/compiler.gni
+++ b/llvm/utils/gn/build/toolchain/compiler.gni
@@ -1,19 +1,8 @@
declare_args() {
- # Whether to use goma (https://chromium.googlesource.com/infra/goma/client/)
- use_goma = false
-
- # If is_goma is true, the location of the goma client install.
- # Set this to the output of `goma_ctl goma_dir`.
- goma_dir = ""
-
# If set, this is prepended to compile action command lines (e.g. `"ccache"`).
- # Cannot be used with use_goma/goma_dir.
compiler_wrapper = ""
# Set this to a clang build directory. If set, that clang is used as compiler.
- # goma only works with compiler binaries it knows about, so useful both for
- # using a goma-approved compiler and for compiling clang with a locally-built
- # clang in a different build directory.
# On Windows, setting this also causes lld-link to be used as linker.
# Example value: getenv("HOME") + "/src/llvm-build/Release+Asserts"
clang_base_path = ""
More information about the llvm-commits
mailing list