diff options
author | Vladimir Vukicevic <vladimir@pobox.com> | 2016-11-16 11:06:00 -0500 |
---|---|---|
committer | Vladimir Vukicevic <vladimir@pobox.com> | 2016-11-21 09:25:31 -0500 |
commit | a82be9ffb42ec2656f1b7b3be8e101b7ddffa889 (patch) | |
tree | f1cbcde24296c376922e71bfa98a2ec74aefea26 /python/servo/command_base.py | |
parent | eb531c15d990391f73f3a1030b103dfc3e023427 (diff) | |
download | servo-a82be9ffb42ec2656f1b7b3be8e101b7ddffa889.tar.gz servo-a82be9ffb42ec2656f1b7b3be8e101b7ddffa889.zip |
Support build.rustflags in .servobuild
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 1a236bdf1fa..baae72c6d69 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -276,6 +276,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", "") @@ -467,6 +468,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: |