mach: Use cargo rustc instead of cargo build (#32484)

This allows passing `--crate-type` and rustflags which only apply
to the top-level-crate.
The former is useful to merge the android and ohos apps
into servoshell, while the later may be useful in the
future.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2024-06-13 12:03:32 +02:00 committed by GitHub
parent 0a641816bf
commit 43df0a48ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,7 +99,7 @@ class MachCommands(CommandBase):
print((key, env[key]))
status = self.run_cargo_build_like_command(
"build", opts, env=env, verbose=verbose, **kwargs)
"rustc", opts, env=env, verbose=verbose, **kwargs)
if status == 0:
built_binary = self.get_binary_path(