From 505f125d821a25ba4f906c67acd20b68aa6f7096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20R=2E=20Sede=C3=B1o?= Date: Thu, 3 Oct 2024 16:21:20 -0400 Subject: [PATCH] gcc: add a `--host_linkopt` to use `gold` too (#36438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, when building in the envoy docker without RBE, I see gcc trying to use `lld` instead, and it's (a) not in `$PATH` and (b) counter to what we had set in `--linkopt` for the gcc config. Risk Level: low Testing: local build in envoy docker Signed-off-by: Alejandro R. SedeƱo --- .bazelrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc index c01fb9a2464c..637ac2a593e3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -91,7 +91,7 @@ build:clang-pch --spawn_strategy=local build:clang-pch --define=ENVOY_CLANG_PCH=1 # Use gold linker for gcc compiler. -build:gcc --linkopt=-fuse-ld=gold +build:gcc --linkopt=-fuse-ld=gold --host_linkopt=-fuse-ld=gold build:gcc --test_env=HEAPCHECK= build:gcc --action_env=BAZEL_COMPILER=gcc build:gcc --action_env=CC=gcc --action_env=CXX=g++