mirror of
https://github.com/servo/servo.git
synced 2025-06-08 08:33:26 +00:00
Auto merge of #14251 - vvuk:servobuild-rustflags, r=ConnorGBrewster
Support build.rustflags in .servobuild Add ability to specify rustflags in .servobuild. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14251) <!-- Reviewable:end -->
This commit is contained in:
commit
75c869d508
2 changed files with 6 additions and 0 deletions
|
@ -297,6 +297,7 @@ class CommandBase(object):
|
||||||
self.config["build"].setdefault("mode", "")
|
self.config["build"].setdefault("mode", "")
|
||||||
self.config["build"].setdefault("debug-mozjs", False)
|
self.config["build"].setdefault("debug-mozjs", False)
|
||||||
self.config["build"].setdefault("ccache", "")
|
self.config["build"].setdefault("ccache", "")
|
||||||
|
self.config["build"].setdefault("rustflags", "")
|
||||||
|
|
||||||
self.config.setdefault("android", {})
|
self.config.setdefault("android", {})
|
||||||
self.config["android"].setdefault("sdk", "")
|
self.config["android"].setdefault("sdk", "")
|
||||||
|
@ -486,6 +487,9 @@ class CommandBase(object):
|
||||||
|
|
||||||
env['RUSTDOC'] = path.join(self.context.topdir, 'etc', 'rustdoc-with-private')
|
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
|
# 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 self.config["tools"]["rustc-with-gold"] and sys.platform not in ("win32", "msys"):
|
||||||
if subprocess.call(['which', 'ld.gold'], stdout=PIPE, stderr=PIPE) == 0:
|
if subprocess.call(['which', 'ld.gold'], stdout=PIPE, stderr=PIPE) == 0:
|
||||||
|
|
|
@ -38,6 +38,8 @@ android = false
|
||||||
debug-mozjs = false
|
debug-mozjs = false
|
||||||
# Set to the path to your ccache binary to enable caching of compiler outputs
|
# Set to the path to your ccache binary to enable caching of compiler outputs
|
||||||
#ccache = "/usr/local/bin/ccache"
|
#ccache = "/usr/local/bin/ccache"
|
||||||
|
# Any optional flags that will be added to $RUSTFLAGS
|
||||||
|
#rustflags = ""
|
||||||
|
|
||||||
# Android information
|
# Android information
|
||||||
[android]
|
[android]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue