Skip to content
Permalink
Browse files

Support build.rustflags in .servobuild

  • Loading branch information...
vvuk committed Nov 16, 2016
1 parent eb531c1 commit a82be9ffb42ec2656f1b7b3be8e101b7ddffa889
Showing with 6 additions and 0 deletions.
  1. +4 −0 python/servo/command_base.py
  2. +2 −0 servobuild.example
@@ -276,6 +276,7 @@ def resolverelative(category, key):
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 @@ def build_env(self, hosts_file_path=None, target=None, is_build=False):

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:
@@ -38,6 +38,8 @@ android = false
debug-mozjs = false
# Set to the path to your ccache binary to enable caching of compiler outputs
#ccache = "/usr/local/bin/ccache"
# Any optional flags that will be added to $RUSTFLAGS
#rustflags = ""

# Android information
[android]

0 comments on commit a82be9f

Please sign in to comment.
You can’t perform that action at this time.