aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo/command_base.py')
-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 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: