mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
Auto merge of #7249 - servo:gold, r=paulrouget
Only use a rustc wrapper script when ld.gold is available. Fixes #7247. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7249) <!-- Reviewable:end -->
This commit is contained in:
commit
95c6301cf4
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue