mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Support build.rustflags in .servobuild
This commit is contained in:
parent
eb531c15d9
commit
a82be9ffb4
2 changed files with 6 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue