--sysroot ignored by -vV #135165
Labels
A-CLI
Area: Command-line interface (CLI) to the compiler
A-cranelift
Things relevant to the [future] cranelift backend
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this:
Put a custom codegen backend in a custom sysroot and call
rustc -vV --sysroot /path/to/sysroot -Zcodegen-backend=my_backend
.I expected to see this happen: Among other things the version of the custom codegen backend is printed.
Instead, this happened: After rustc's own version, it prints
error: unsupported builtin codegen backend `my_backend`
and exits with an error code.This is blocking me from putting a locally built cg_clif in a custom sysroot and then using
profile.dev.codegen-backend = "cranelift"
as opposed to usingRUSTFLAGS="-Zcodegen-backend=/path/to/librustc_codegen_cranelift.so"
. Cargo only supports setting the codegen backend using profiles for codegen backends that are part of a sysroot, but configuring the codegen backend on a per-package basis requires using a cargo profile setting rather thanRUSTFLAGS
.Meta
rustc --version --verbose
:rust/compiler/rustc_driver_impl/src/lib.rs
Line 922 in 243d2ca
--sysroot
flag rather than takingopts.maybe_sysroot
fromOptions::default()
.The text was updated successfully, but these errors were encountered: