mirror of
https://git.proxmox.com/git/rustc
synced 2026-01-26 06:15:30 +00:00
cargo wrapper: fix LTO position in argument lists
this caused loupe to FTBFS after it disabled LTO for certain architectures: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086025 because the `cargo test` invocation sets arguments for the test runner (via `--`), which means the LTO options can't go last in the argument list. Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
This commit is contained in:
parent
a856ac4c86
commit
4d49fcdcbe
6
debian/bin/cargo
vendored
6
debian/bin/cargo
vendored
@ -217,6 +217,9 @@ def main(*args):
|
||||
subcmd = a
|
||||
newargs.extend(["-Zavoid-dev-deps", a, "--verbose", "--verbose"] +
|
||||
parallel + ["--target", host_rust_type])
|
||||
if lto:
|
||||
newargs.append("--config")
|
||||
newargs.append(f"profile.release.lto={lto}")
|
||||
elif (subcmd is None) and (a == "clean"):
|
||||
subcmd = a
|
||||
newargs.extend([a, "--verbose", "--verbose"])
|
||||
@ -231,9 +234,6 @@ def main(*args):
|
||||
if nocheck and subcmd in ("test", "bench"):
|
||||
return 0
|
||||
|
||||
if lto:
|
||||
newargs.append("--config")
|
||||
newargs.append(f"profile.release.lto={lto}")
|
||||
|
||||
if subcmd == "clean":
|
||||
logrun(["env", "RUST_BACKTRACE=1", "/usr/bin/cargo"] + list(newargs), check=True)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user