Rollup merge of #111979 - jyn514:cargoflags, r=albertlarsan68
Respect CARGOFLAGS in bootstrap.py This makes it possible to pass flags to bootstrap itself, for consistency with std/rustc:04265621f9/src/bootstrap/builder.rs (L1446-L1447)
Like RUSTFLAGS, this doesn't support CARGOFLAGS_BOOTSTRAP:6674dcda7a/src/bootstrap/bootstrap.py (L883-L884)
I found this useful recently when I wanted to pass `-Zsparse-registry` to an old checkout of the compiler from before it was stabilized in cargo.
This commit is contained in:
commit
aee05c74e1
@ -918,6 +918,10 @@ class RustBuild(object):
|
||||
args.append("--color=always")
|
||||
elif color == "never":
|
||||
args.append("--color=never")
|
||||
try:
|
||||
args += env["CARGOFLAGS"].split()
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
# Run this from the source directory so cargo finds .cargo/config
|
||||
run(args, env=env, verbose=self.verbose, cwd=self.rust_root)
|
||||
|
Loading…
Reference in New Issue
Block a user