Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove gold hack, since it's in rustc automatically now" #9449

Merged
merged 1 commit into from Feb 1, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -0,0 +1,2 @@
#!/bin/sh
rustc -C link-args=-fuse-ld=gold "$@"
@@ -11,6 +11,7 @@
from os import path
import contextlib
import subprocess
from subprocess import PIPE
import sys
import toml

@@ -153,6 +154,7 @@ def resolverelative(category, key):
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 @@ def build_env(self, gonk=False, hosts_file_path=None):

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):
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.