mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01: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",
|
"--manifest-path",
|
||||||
path.join(self.context.topdir, "ports", "servoshell", "Cargo.toml"),
|
path.join(self.context.topdir, "ports", "servoshell", "Cargo.toml"),
|
||||||
]
|
]
|
||||||
if target_override:
|
|
||||||
args += ["--target", target_override]
|
if self.target.is_cross_build():
|
||||||
elif self.target.is_cross_build():
|
|
||||||
args += ["--target", self.target.triple()]
|
args += ["--target", self.target.triple()]
|
||||||
if type(self.target) in [AndroidTarget, OpenHarmonyTarget]:
|
if type(self.target) in [AndroidTarget, OpenHarmonyTarget]:
|
||||||
# Note: in practice `cargo rustc` should just be used unconditionally.
|
# 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"
|
assert command != "build", "For Android / OpenHarmony `cargo rustc` must be used instead of cargo build"
|
||||||
if command == "rustc":
|
if command == "rustc":
|
||||||
args += ["--lib", "--crate-type=cdylib"]
|
args += ["--lib", "--crate-type=cdylib"]
|
||||||
|
elif target_override:
|
||||||
|
args += ["--target", target_override]
|
||||||
|
|
||||||
features = []
|
features = []
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue