aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
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: