aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-12-13 16:55:12 -0800
committerGitHub <noreply@github.com>2016-12-13 16:55:12 -0800
commit75c869d508231a216413808d80d6e02dec3ced6c (patch)
treed4e7304169916d4c981120b50bfbcb1271daf9af /python
parent91a223093368be339ad00f42df4214ac36e1be6e (diff)
parenta82be9ffb42ec2656f1b7b3be8e101b7ddffa889 (diff)
downloadservo-75c869d508231a216413808d80d6e02dec3ced6c.tar.gz
servo-75c869d508231a216413808d80d6e02dec3ced6c.zip
Auto merge of #14251 - vvuk:servobuild-rustflags, r=ConnorGBrewster
Support build.rustflags in .servobuild Add ability to specify rustflags in .servobuild. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14251) <!-- Reviewable:end -->
Diffstat (limited to 'python')
-rw-r--r--python/servo/command_base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 9fc797b28f9..b337ca5e9ed 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -297,6 +297,7 @@ class CommandBase(object):
self.config["build"].setdefault("mode", "")
self.config["build"].setdefault("debug-mozjs", False)
self.config["build"].setdefault("ccache", "")
+ self.config["build"].setdefault("rustflags", "")
self.config.setdefault("android", {})
self.config["android"].setdefault("sdk", "")
@@ -486,6 +487,9 @@ class CommandBase(object):
env['RUSTDOC'] = path.join(self.context.topdir, 'etc', 'rustdoc-with-private')
+ if self.config["build"]["rustflags"]:
+ env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " " + self.config["build"]["rustflags"]
+
# Don't run the gold linker if on Windows https://github.com/servo/servo/issues/9499
if self.config["tools"]["rustc-with-gold"] and sys.platform not in ("win32", "msys"):
if subprocess.call(['which', 'ld.gold'], stdout=PIPE, stderr=PIPE) == 0: