Update command_base.py

Fixup for https://github.com/servo/servo/pull/29912#issuecomment-1605347271
This commit is contained in:
Samson 2023-06-24 12:05:32 +02:00 committed by GitHub
parent 19eeca7b3a
commit 0256ac9c62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -629,7 +629,7 @@ class CommandBase(object):
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " " + self.config["build"]["rustflags"]
if self.config["tools"]["rustc-with-gold"]:
if subprocess.call(['which', 'ld.gold'], stdout=PIPE, stderr=PIPE) == 0:
if shutil.which('ld.gold'):
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C link-args=-fuse-ld=gold"
if not (self.config["build"]["ccache"] == ""):