Merge pull request #48 from hlopko:fix_gold

PiperOrigin-RevId: 278581858
Change-Id: Id8791b4b1405f5210cc60714ed8d77feddc800dd
This commit is contained in:
Copybara-Service 2019-11-05 03:21:47 -08:00
commit 5c0675a136
1 changed files with 4 additions and 0 deletions

View File

@ -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