diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-08-17 09:19:29 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-08-17 09:20:07 +0200 |
commit | 1dab9294f481ac94d95a24c69553aa0738aaf2db (patch) | |
tree | 418a497cb97c83aa47646266d7e3a55f6b95bf6c /python/servo/command_base.py | |
parent | fb7a53c6cfc8bc2985423a55834507c930537bfc (diff) | |
download | servo-1dab9294f481ac94d95a24c69553aa0738aaf2db.tar.gz servo-1dab9294f481ac94d95a24c69553aa0738aaf2db.zip |
Only use a rustc wrapper script when ld.gold is available.
Fixes #7247.
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 15f3d28ef0a..5beff5d4111 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -11,6 +11,7 @@ import os from os import path import contextlib import subprocess +from subprocess import PIPE import sys import toml @@ -303,7 +304,9 @@ class CommandBase(object): env['HOST_FILE'] = hosts_file_path env['RUSTDOC'] = path.join(self.context.topdir, 'etc', 'rustdoc-with-private') - env['RUSTC'] = path.join(self.context.topdir, 'etc', 'rustc-with-gold') + + if subprocess.call(['which', 'ld.gold'], stdout=PIPE, stderr=PIPE) == 0: + env['RUSTC'] = path.join(self.context.topdir, 'etc', 'rustc-with-gold') return env |