@@ -98,7 +98,6 @@ build:linux --cxxopt=-fsized-deallocation --host_cxxopt=-fsized-deallocation
9898build:linux --conlyopt=-fexceptions
9999build:linux --fission=dbg,opt
100100build:linux --features=per_object_debug_info
101- build:linux --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a
102101build:linux --action_env=BAZEL_LINKOPTS=-lm:-fuse-ld=gold
103102
104103# macOS
@@ -113,15 +112,20 @@ build:macos --cxxopt=-Wno-nullability-completeness
113112#############################################################################
114113
115114# Common flags for Clang (shared between all clang variants)
116- common:clang-common --action_env=BAZEL_COMPILER=clang
117115common:clang-common --linkopt=-fuse-ld=lld
116+ common:clang-common --action_env=BAZEL_COMPILER=clang
117+ common:clang-common --action_env=LDFLAGS="-fuse-ld=lld"
118118common:clang-common --action_env=CC=clang --host_action_env=CC=clang
119119common:clang-common --action_env=CXX=clang++ --host_action_env=CXX=clang++
120120
121121# Clang with libc++ (default)
122122common:clang --config=clang-common
123123common:clang --config=libc++
124- common:clang --action_env=LDFLAGS="-fuse-ld=lld"
124+ common:clang --host_platform=@clang_platform
125+
126+ # Clang installed to non-standard location (ie not /opt/llvm/)
127+ common:clang-local --config=clang-common
128+ common:clang-local --config=libc++
125129
126130# Use gold linker for gcc compiler.
127131build:gcc --config=libstdc++
@@ -141,8 +145,9 @@ build:gcc --cxxopt=-Wno-missing-requires
141145build:gcc --cxxopt=-Wno-dangling-reference
142146build:gcc --cxxopt=-Wno-nonnull-compare
143147build:gcc --linkopt=-fuse-ld=gold --host_linkopt=-fuse-ld=gold
148+ build:gcc --host_platform=@envoy//bazel/rbe/toolchains:rbe_linux_gcc_platform
144149
145- # libc++ default for clang
150+ # libc++ - default for clang
146151common:libc++ --action_env=CXXFLAGS=-stdlib=libc++
147152common:libc++ --action_env=LDFLAGS="-stdlib=libc++ -fuse-ld=lld"
148153common:libc++ --action_env=BAZEL_CXXOPTS=-stdlib=libc++
@@ -152,6 +157,7 @@ common:libc++ --define force_libcpp=enabled
152157common:libc++ --@envoy//bazel:libc++=true
153158
154159# libstdc++ - currently only used for gcc
160+ build:libstdc++ --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a
155161build:libstdc++ --@envoy//bazel:libc++=false
156162build:libstdc++ --@envoy//bazel:libstdc++=true
157163
@@ -383,31 +389,11 @@ build:sizeopt -c opt --copt -Os
383389# remote: Setup for cache, BES, RBE, and Docker workers
384390#############################################################################
385391
386- # Remote execution: https://docs.bazel.build/versions/master/remote-execution.html
387- build:rbe-toolchain --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
388-
389- build:rbe-toolchain-clang --config=rbe-toolchain
390- build:rbe-toolchain-clang --config=clang
391- build:rbe-toolchain-clang --platforms=@clang_platform
392- build:rbe-toolchain-clang --host_platform=@clang_platform
393- build:rbe-toolchain-clang --crosstool_top=@envoy//bazel/rbe/toolchains/configs/linux/clang/cc:toolchain
394-
395- build:rbe-toolchain-gcc --config=rbe-toolchain
396- build:rbe-toolchain-gcc --config=gcc
397- build:rbe-toolchain-gcc --platforms=@envoy//bazel/rbe/toolchains:rbe_linux_gcc_platform
398- build:rbe-toolchain-gcc --host_platform=@envoy//bazel/rbe/toolchains:rbe_linux_gcc_platform
399- build:rbe-toolchain-gcc --crosstool_top=@envoy//bazel/rbe/toolchains/configs/linux/gcc/cc:toolchain
400-
401- build:remote-clang --config=remote
402- build:remote-clang --config=rbe-toolchain-clang
403-
404- build:remote-gcc --config=remote
405- build:remote-gcc --config=rbe-toolchain-gcc
406-
407392build:remote --spawn_strategy=remote,sandboxed,local
408393build:remote --strategy=Javac=remote,sandboxed,local
409394build:remote --strategy=Closure=remote,sandboxed,local
410395build:remote --strategy=Genrule=remote,sandboxed,local
396+ build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
411397
412398## RBE (Engflow Envoy)
413399
@@ -447,22 +433,21 @@ build:docker-sandbox --experimental_docker_verbose
447433build:docker-sandbox --experimental_enable_docker_sandbox
448434
449435build:docker-clang --config=docker-sandbox
450- build:docker-clang --config=rbe-toolchain- clang
436+ build:docker-clang --config=clang
451437
452438build:docker-gcc --config=docker-sandbox
453439build:docker-gcc --config=gcc
454- build:docker-gcc --config=rbe-toolchain-gcc
455440
456441build:docker-asan --config=docker-sandbox
457- build:docker-asan --config=rbe-toolchain- clang
442+ build:docker-asan --config=clang
458443build:docker-asan --config=asan
459444
460445build:docker-msan --config=docker-sandbox
461- build:docker-msan --config=rbe-toolchain- clang
446+ build:docker-msan --config=clang
462447build:docker-msan --config=msan
463448
464449build:docker-tsan --config=docker-sandbox
465- build:docker-tsan --config=rbe-toolchain- clang
450+ build:docker-tsan --config=clang
466451build:docker-tsan --config=tsan
467452
468453
0 commit comments