From 1f8a00e6b838bce28d22f33d5741df5d99d4dc62 Mon Sep 17 00:00:00 2001 From: Marcel Hlopko Date: Mon, 4 Nov 2019 20:02:10 +0100 Subject: [PATCH] Skip gcc build configuration options mentioning gold --- cc/private/toolchain/unix_cc_configure.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cc/private/toolchain/unix_cc_configure.bzl b/cc/private/toolchain/unix_cc_configure.bzl index 856486e..124c8e2 100644 --- a/cc/private/toolchain/unix_cc_configure.bzl +++ b/cc/private/toolchain/unix_cc_configure.bzl @@ -209,6 +209,10 @@ def _find_gold_linker_path(repository_ctx, cc): for flag in line.split(" "): if flag.find("gold") == -1: continue + if flag.find("--enable-gold") > -1 or flag.find("--with-plugin-ld") > -1: + # skip build configuration options of gcc itself + # TODO(hlopko): Add redhat-like worker on the CI (#9392) + continue # flag is '-fuse-ld=gold' for GCC or "/usr/lib/ld.gold" for Clang # strip space, single quote, and double quotes