Skip to content

Commit

Permalink
Skip gcc build configuration options mentioning gold in ld.gold detec…
Browse files Browse the repository at this point in the history
…tion

Fixes #9392

rules_cc version of this change is in bazelbuild/rules_cc#48.

RELNOTES: None.
PiperOrigin-RevId: 283025854
  • Loading branch information
hlopko authored and copybara-github committed Nov 29, 2019
1 parent 69e0894 commit f31ee4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/cpp/unix_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,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
Expand Down

0 comments on commit f31ee4d

Please sign in to comment.