diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-02-01 14:57:02 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-02-01 14:57:02 +0530 |
commit | 220ead14b16c8965335a6d54e037f2e30fc634ea (patch) | |
tree | 9507be2e990709a723ca45665bae47113055744d | |
parent | 1934cbac640771429a4fb94866c277eb92d05b22 (diff) | |
parent | 864fe53956db84c0ca218cb01a90b60f0c1c4556 (diff) | |
download | servo-220ead14b16c8965335a6d54e037f2e30fc634ea.tar.gz servo-220ead14b16c8965335a6d54e037f2e30fc634ea.zip |
Auto merge of #9449 - larsbergstrom:revert_gold_removal, r=mbrubeck
Revert "Remove gold hack, since it's in rustc automatically now"
This reverts commit 2955d895a4d723bc616f37a55a973c677318a950.
r? @mbrubeck
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9449)
<!-- Reviewable:end -->
-rwxr-xr-x | etc/rustc-with-gold | 2 | ||||
-rw-r--r-- | python/servo/command_base.py | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/etc/rustc-with-gold b/etc/rustc-with-gold new file mode 100755 index 00000000000..077aa7f0d0b --- /dev/null +++ b/etc/rustc-with-gold @@ -0,0 +1,2 @@ +#!/bin/sh +rustc -C link-args=-fuse-ld=gold "$@" diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 431bb64fd44..1acf5abd832 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 @@ -153,6 +154,7 @@ class CommandBase(object): if not self.config["tools"]["system-cargo"]: self.config["tools"]["cargo-root"] = path.join( context.sharedir, "cargo", self.cargo_build_id()) + self.config["tools"].setdefault("rustc-with-gold", True) self.config.setdefault("build", {}) self.config["build"].setdefault("android", False) @@ -377,6 +379,10 @@ class CommandBase(object): env['RUSTDOC'] = path.join(self.context.topdir, 'etc', 'rustdoc-with-private') + if self.config["tools"]["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 def servo_crate(self): |