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("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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue