aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2023-09-10 20:32:10 +0200
committerGitHub <noreply@github.com>2023-09-10 18:32:10 +0000
commit9b1247b20f2de6bbba39efff49eabc63e865ce2e (patch)
treeb645796558b72c3bbc6b3235c4c6a3d3c31b756d /python/servo/command_base.py
parentd470955032967289f040800852dca044f3182aff (diff)
downloadservo-9b1247b20f2de6bbba39efff49eabc63e865ce2e.tar.gz
servo-9b1247b20f2de6bbba39efff49eabc63e865ce2e.zip
No extern crate test/tidy & better RUSTFLAGS handling in mach (#30328)
* Remove unused extern crate rustflag * Remove tidy check alphabetical order of extern crates rustfmt's reorder_imports already does that * fix * better RUSTFLAGS handling
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 449c81bbf3d..137dfeea090 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -481,14 +481,16 @@ class CommandBase(object):
elif self.config["build"]["incremental"] is not None:
env["CARGO_INCREMENTAL"] = "0"
+ env['RUSTFLAGS'] = env.get('RUSTFLAGS', "")
+
if self.config["build"]["rustflags"]:
- env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " " + self.config["build"]["rustflags"]
+ env['RUSTFLAGS'] += " " + self.config["build"]["rustflags"]
# Turn on rust's version of lld if we are on x86 Linux.
# TODO(mrobinson): Gradually turn this on for more platforms, when support stabilizes.
# See https://github.com/rust-lang/rust/issues/39915
if not self.cross_compile_target and effective_target == "x86_64-unknown-linux-gnu":
- env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + servo.platform.get().linker_flag()
+ env['RUSTFLAGS'] += " " + servo.platform.get().linker_flag()
if not (self.config["build"]["ccache"] == ""):
env['CCACHE'] = self.config["build"]["ccache"]
@@ -497,9 +499,8 @@ class CommandBase(object):
if self.cross_compile_target and (
self.cross_compile_target.startswith('arm')
or self.cross_compile_target.startswith('aarch64')):
- env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C target-feature=+neon"
+ env['RUSTFLAGS'] += " -C target-feature=+neon"
- env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -W unused-extern-crates"
env["CARGO_TARGET_DIR"] = servo.util.get_target_dir()
if self.config["build"]["thinlto"]: