mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
mach: Fix cross-build check when using asan
When using asan the target_override is enabled, but we can also still be cross-compiling. Swapping the order fixes the cross-build detection in combination with asan. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
c6e37e83e4
commit
979304e493
1 changed files with 4 additions and 3 deletions
|
@ -803,15 +803,16 @@ class CommandBase(object):
|
|||
"--manifest-path",
|
||||
path.join(self.context.topdir, "ports", "servoshell", "Cargo.toml"),
|
||||
]
|
||||
if target_override:
|
||||
args += ["--target", target_override]
|
||||
elif self.target.is_cross_build():
|
||||
|
||||
if self.target.is_cross_build():
|
||||
args += ["--target", self.target.triple()]
|
||||
if type(self.target) in [AndroidTarget, OpenHarmonyTarget]:
|
||||
# Note: in practice `cargo rustc` should just be used unconditionally.
|
||||
assert command != "build", "For Android / OpenHarmony `cargo rustc` must be used instead of cargo build"
|
||||
if command == "rustc":
|
||||
args += ["--lib", "--crate-type=cdylib"]
|
||||
elif target_override:
|
||||
args += ["--target", target_override]
|
||||
|
||||
features = []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue