@@ -45,12 +45,6 @@ build --incompatible_merge_fixed_and_default_shell_env
4545# A workaround for slow ICU download.
4646build --http_timeout_scaling=6.0
4747
48- # Pass CC, CXX and LLVM_CONFIG variables from the environment.
49- # We assume they have stable values, so this won't cause action cache misses.
50- build --action_env=CC --host_action_env=CC
51- build --action_env=CXX --host_action_env=CXX
52- build --action_env=LLVM_CONFIG --host_action_env=LLVM_CONFIG
53-
5448# Allow stamped caches to bust when local filesystem changes.
5549# Requires setting `BAZEL_VOLATILE_DIRTY` in the env.
5650build --action_env=BAZEL_VOLATILE_DIRTY --host_action_env=BAZEL_VOLATILE_DIRTY
@@ -99,13 +93,14 @@ build:linux --cxxopt=-fsized-deallocation --host_cxxopt=-fsized-deallocation
9993build:linux --conlyopt=-fexceptions
10094build:linux --fission=dbg,opt
10195build:linux --features=per_object_debug_info
102- build:linux --action_env=BAZEL_LINKOPTS=-lm:-fuse-ld=gold
10396
10497# macOS
10598build:macos --action_env=PATH=/opt/homebrew/bin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin
10699build:macos --host_action_env=PATH=/opt/homebrew/bin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin
107100build:macos --define tcmalloc=disabled
108101build:macos --cxxopt=-Wno-nullability-completeness
102+ build:macos --@toolchains_llvm//toolchain/config:compiler-rt=false
103+ build:macos --@toolchains_llvm//toolchain/config:libunwind=false
109104
110105
111106#############################################################################
@@ -114,15 +109,14 @@ build:macos --cxxopt=-Wno-nullability-completeness
114109
115110# Common flags for Clang (shared between all clang variants)
116111common:clang-common --linkopt=-fuse-ld=lld
117- common:clang-common --action_env=BAZEL_COMPILER=clang
118- common:clang-common --action_env=LDFLAGS="-fuse-ld=lld"
119- common:clang-common --action_env=CC=clang --host_action_env=CC=clang
120- common:clang-common --action_env=CXX=clang++ --host_action_env=CXX=clang++
112+ common:clang-common --@toolchains_llvm//toolchain/config:compiler-rt=false
113+ common:clang-common --@toolchains_llvm//toolchain/config:libunwind=false
121114
122115# Clang with libc++ (default)
123116common:clang --config=clang-common
124117common:clang --config=libc++
125118common:clang --host_platform=@clang_platform
119+ common:clang --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
126120
127121# Clang installed to non-standard location (ie not /opt/llvm/)
128122common:clang-local --config=clang-common
@@ -147,6 +141,8 @@ build:gcc --cxxopt=-Wno-dangling-reference
147141build:gcc --cxxopt=-Wno-nonnull-compare
148142build:gcc --linkopt=-fuse-ld=gold --host_linkopt=-fuse-ld=gold
149143build:gcc --host_platform=@envoy//bazel/rbe/toolchains:rbe_linux_gcc_platform
144+ build:gcc --linkopt=-fuse-ld=gold --host_linkopt=-fuse-ld=gold
145+ build:gcc --action_env=BAZEL_LINKOPTS=-lm:-fuse-ld=gold
150146
151147# libc++ - default for clang
152148common:libc++ --action_env=CXXFLAGS=-stdlib=libc++
@@ -395,6 +391,9 @@ build:remote --strategy=Javac=remote,sandboxed,local
395391build:remote --strategy=Closure=remote,sandboxed,local
396392build:remote --strategy=Genrule=remote,sandboxed,local
397393build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
394+ # This flag may be more generally useful - it sets foreign_cc builds -jauto.
395+ # It is only set here because if it were the default it risks OOMing on local builds.
396+ build:remote --@envoy//bazel/foreign_cc:parallel_builds
398397
399398## RBE (Engflow Envoy)
400399
0 commit comments