Skip to content

Commit 9a4ba81

Browse files
authored
Clean up goma from GN files (#858)
Tested in flutter/engine#52826
1 parent ce4faea commit 9a4ba81

File tree

13 files changed

+17
-102
lines changed

13 files changed

+17
-102
lines changed

build/config/compiler/BUILD.gn

+4-5
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,9 @@ if (is_win) {
600600
"/wd4311", # Pointer truncation from PVOID to DWORD.
601601
"/wd4477", # Format string requires wchar_t*
602602
]
603-
import("//build/toolchain/goma.gni")
604-
if (is_clang && use_goma) {
605-
# goma compilation doesn't preserve file case, so don't warn about
603+
604+
if (is_clang && use_rbe) {
605+
# rbe compilation doesn't preserve file case, so don't warn about
606606
# case-mismatches.
607607
default_warning_flags += [
608608
"-Wno-nonportable-include-path",
@@ -950,8 +950,7 @@ config("optimize_speed") {
950950

951951
config("symbols") {
952952
if (is_win) {
953-
import("//build/toolchain/goma.gni")
954-
if (use_goma) {
953+
if (use_rbe) {
955954
cflags = [ "/Z7" ] # No PDB file
956955
} else {
957956
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.

build/config/ios/ios_sdk.gni

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
import("//build/toolchain/goma.gni")
65
import("//build/toolchain/rbe.gni")
76

87
declare_args() {
@@ -34,7 +33,7 @@ declare_args() {
3433

3534
if (ios_sdk_path == "") {
3635
ios_sdk_args = []
37-
if ((use_goma || use_rbe) && create_xcode_symlinks) {
36+
if (use_rbe && create_xcode_symlinks) {
3837
ios_sdk_args += [
3938
"--symlink",
4039
rebase_path("//flutter/prebuilts"),

build/config/mac/mac_sdk.gni

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
import("//build/toolchain/goma.gni")
65
import("//build/toolchain/rbe.gni")
76

87
declare_args() {
@@ -24,7 +23,7 @@ assert(mac_deployment_target != "")
2423

2524
if (mac_sdk_path == "") {
2625
find_sdk_args = []
27-
if ((use_goma || use_rbe) && create_xcode_symlinks) {
26+
if (use_rbe && create_xcode_symlinks) {
2827
# RBE has a restriction that paths cannot come from outside the build root.
2928
find_sdk_args += [
3029
"--symlink",

build/config/sysroot.gni

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# This header file defines the "sysroot" variable which is the absolute path
66
# of the sysroot. If no sysroot applies, the variable will be an empty string.
77

8-
import("//build/toolchain/goma.gni")
9-
108
declare_args() {
119
# The absolute path of the sysroot that is applied when compiling using
1210
# the target toolchain.

build/toolchain/android/BUILD.gn

+1-13
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
# found in the LICENSE file.
44

55
import("//build/config/sysroot.gni") # Imports android/config.gni.
6-
import("//build/toolchain/ccache.gni")
76
import("//build/toolchain/clang.gni")
87
import("//build/toolchain/gcc_toolchain.gni")
9-
import("//build/toolchain/goma.gni")
108
import("//build/toolchain/rbe.gni")
119
import("//build/toolchain/toolchain.gni")
1210

@@ -37,13 +35,7 @@ template("android_toolchain") {
3735
solink_libs_section_prefix = "$android_ndk_lib/crtbegin_so.o"
3836
solink_libs_section_postfix = "$android_ndk_lib/crtend_so.o"
3937

40-
if (use_goma) {
41-
assert(!use_rbe, "Goma and RBE can't be used together.")
42-
assert(!use_ccache, "Goma and ccache can't be used together.")
43-
assembler_prefix = "$goma_dir/gomacc "
44-
compiler_prefix = "$goma_dir/gomacc "
45-
link_prefix = "$goma_dir/gomacc "
46-
} else if (use_rbe) {
38+
if (use_rbe) {
4739
remote_wrapper = ""
4840
if (host_os == "linux") {
4941
remote_wrapper =
@@ -64,10 +56,6 @@ template("android_toolchain") {
6456
assembler_prefix = ""
6557
compiler_prefix = string_join(" ", compiler_args)
6658
link_prefix = ""
67-
} else if (use_ccache) {
68-
assembler_prefix = "ccache "
69-
compiler_prefix = "ccache "
70-
link_prefix = "ccache "
7159
} else {
7260
compiler_prefix = ""
7361
link_prefix = ""

build/toolchain/fuchsia/BUILD.gn

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
# found in the LICENSE file.
44

55
import("//build/toolchain/clang.gni")
6-
import("//build/toolchain/goma.gni")
76
import("//build/toolchain/rbe.gni")
87
import("//build/toolchain/toolchain.gni")
98

10-
if (use_goma) {
11-
assert(!use_rbe, "Goma and RBE can't be used together.")
12-
compiler_prefix = "$goma_dir/gomacc "
13-
link_prefix = "$goma_dir/gomacc "
14-
} else if (use_rbe) {
9+
if (use_rbe) {
1510
compiler_args =
1611
rewrapper_command + [ "--labels=type=compile,compiler=clang,lang=cpp " ]
1712
compiler_prefix = string_join(" ", compiler_args)

build/toolchain/gcc_toolchain.gni

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import("//build/toolchain/clang.gni")
66
import("//build/toolchain/clang_static_analyzer.gni")
7-
import("//build/toolchain/goma.gni")
87
import("//build/toolchain/rbe.gni")
98

109
# Path to the Clang static analysis wrapper script.

build/toolchain/goma.gni

-31
This file was deleted.

build/toolchain/linux/BUILD.gn

+1-11
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,15 @@
33
# found in the LICENSE file.
44

55
import("//build/config/sysroot.gni")
6-
import("//build/toolchain/ccache.gni")
76
import("//build/toolchain/gcc_toolchain.gni")
8-
import("//build/toolchain/goma.gni")
97
import("//build/toolchain/rbe.gni")
108
import("//build/toolchain/toolchain.gni")
119

1210
declare_args() {
1311
toolchain_prefix = ""
1412
}
1513

16-
if (use_goma) {
17-
assert(!use_rbe, "Goma and RBE can't be used together.")
18-
assert(!use_ccache, "Goma and ccache can't be used together.")
19-
compiler_prefix = "$goma_dir/gomacc "
20-
link_prefix = "$goma_dir/gomacc "
21-
} else if (use_rbe) {
14+
if (use_rbe) {
2215
remote_wrapper =
2316
rebase_path("//flutter/build/rbe/remote_wrapper_linux.sh", root_build_dir)
2417
local_wrapper =
@@ -30,9 +23,6 @@ if (use_goma) {
3023
]
3124
compiler_prefix = string_join(" ", compiler_args)
3225
link_prefix = ""
33-
} else if (use_ccache) {
34-
compiler_prefix = "ccache "
35-
link_prefix = "ccache "
3626
} else {
3727
compiler_prefix = ""
3828
link_prefix = ""

build/toolchain/mac/BUILD.gn

+2-9
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,18 @@ import("//build/config/mac/mac_sdk.gni")
99
import("//build/config/sysroot.gni")
1010
import("//build/toolchain/clang.gni")
1111
import("//build/toolchain/clang_static_analyzer.gni")
12-
import("//build/toolchain/goma.gni")
1312
import("//build/toolchain/rbe.gni")
1413
import("//build/toolchain/toolchain.gni")
1514

16-
# Goma doesn't support the host-arm64 toolchain, so continue using Rosetta.
17-
if (host_cpu == "arm64" && !use_goma) {
15+
if (host_cpu == "arm64") {
1816
rebased_clang_dir =
1917
rebase_path("$buildtools_path/mac-arm64/clang/bin", root_build_dir)
2018
} else {
2119
rebased_clang_dir =
2220
rebase_path("$buildtools_path/mac-x64/clang/bin", root_build_dir)
2321
}
2422

25-
if (use_goma) {
26-
assert(!use_rbe, "Goma and RBE can't be used together.")
27-
cxx_prefix = "$goma_dir/gomacc "
28-
objc_prefix = "$goma_dir/gomacc "
29-
link_prefix = "$goma_dir/gomacc "
30-
} else if (use_rbe) {
23+
if (use_rbe) {
3124
remote_wrapper =
3225
rebase_path("//flutter/build/rbe/remote_wrapper.sh", root_build_dir)
3326
local_wrapper =

build/toolchain/rbe.gni

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ declare_args() {
1616
# symlinks is a work around for that when using a local Xcode toolchain.
1717
# This property should not be set to true on LUCI.
1818
#
19-
# If use_goma is false, this property is ignored.
20-
# create_xcode_symlinks = false
19+
# If use_rbe is false, this property is ignored.
20+
create_xcode_symlinks = false
2121

2222
rbe_exec_root = rebase_path("//")
2323

build/toolchain/wasm.gni

+3-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import("//build/toolchain/ccache.gni")
66
import("//build/toolchain/gcc_toolchain.gni")
7-
import("//build/toolchain/goma.gni")
87

98
# Defines the configuration of emscripten for building WASM targets.
109

@@ -18,15 +17,6 @@ declare_args() {
1817

1918
em_config_path = "$emsdk_dir/.emscripten"
2019

21-
if (use_goma) {
22-
assert(!use_ccache, "Goma and ccache can't be used together.")
23-
compiler_prefix = "$goma_dir/gomacc "
24-
} else if (use_ccache) {
25-
compiler_prefix = "ccache "
26-
} else {
27-
compiler_prefix = ""
28-
}
29-
3020
template("wasm_toolchain") {
3121
gcc_toolchain(target_name) {
3222
extra_toolchain_args = {
@@ -36,9 +26,9 @@ template("wasm_toolchain") {
3626
}
3727

3828
# emsdk_dir and em_config are defined in wasm.gni.
39-
ar = "$compiler_prefix$emsdk_dir/upstream/emscripten/emar --em-config $em_config_path"
40-
cc = "$compiler_prefix$emsdk_dir/upstream/emscripten/emcc --em-config $em_config_path"
41-
cxx = "$compiler_prefix$emsdk_dir/upstream/emscripten/em++ --em-config $em_config_path"
29+
ar = "$emsdk_dir/upstream/emscripten/emar --em-config $em_config_path"
30+
cc = "$emsdk_dir/upstream/emscripten/emcc --em-config $em_config_path"
31+
cxx = "$emsdk_dir/upstream/emscripten/em++ --em-config $em_config_path"
4232
asm = cc
4333

4434
# emscripten emits this .worker.js file conditionally depending on whether

build/toolchain/win/BUILD.gn

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ declare_args() {
2121
}
2222

2323
import("//build/config/win/visual_studio_version.gni")
24-
import("//build/toolchain/goma.gni")
2524

2625
# Should only be running on Windows.
2726
assert(is_win)
@@ -35,10 +34,7 @@ assert(is_win)
3534
# This tool will is used as a wrapper for various commands below.
3635
tool_wrapper_path = rebase_path("tool_wrapper.py", root_build_dir)
3736

38-
if (use_goma) {
39-
compiler_prefix = "$goma_dir/gomacc.exe "
40-
asm_prefix = "$goma_dir/gomacc.exe "
41-
} else if (use_rbe) {
37+
if (use_rbe) {
4238
compiler_args = rewrapper_command + [
4339
"--labels=type=compile,compiler=clang-cl,lang=cpp ",
4440
]

0 commit comments

Comments
 (0)