mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Auto merge of #9449 - larsbergstrom:revert_gold_removal, r=mbrubeck
Revert "Remove gold hack, since it's in rustc automatically now"
This reverts commit 2955d895a4
.
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 -->
This commit is contained in:
commit
220ead14b1
2 changed files with 8 additions and 0 deletions
2
etc/rustc-with-gold
Executable file
2
etc/rustc-with-gold
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
rustc -C link-args=-fuse-ld=gold "$@"
|
|
@ -11,6 +11,7 @@ import os
|
||||||
from os import path
|
from os import path
|
||||||
import contextlib
|
import contextlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from subprocess import PIPE
|
||||||
import sys
|
import sys
|
||||||
import toml
|
import toml
|
||||||
|
|
||||||
|
@ -153,6 +154,7 @@ class CommandBase(object):
|
||||||
if not self.config["tools"]["system-cargo"]:
|
if not self.config["tools"]["system-cargo"]:
|
||||||
self.config["tools"]["cargo-root"] = path.join(
|
self.config["tools"]["cargo-root"] = path.join(
|
||||||
context.sharedir, "cargo", self.cargo_build_id())
|
context.sharedir, "cargo", self.cargo_build_id())
|
||||||
|
self.config["tools"].setdefault("rustc-with-gold", True)
|
||||||
|
|
||||||
self.config.setdefault("build", {})
|
self.config.setdefault("build", {})
|
||||||
self.config["build"].setdefault("android", False)
|
self.config["build"].setdefault("android", False)
|
||||||
|
@ -377,6 +379,10 @@ class CommandBase(object):
|
||||||
|
|
||||||
env['RUSTDOC'] = path.join(self.context.topdir, 'etc', 'rustdoc-with-private')
|
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
|
return env
|
||||||
|
|
||||||
def servo_crate(self):
|
def servo_crate(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue