-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
--sysroot ignored by -vV #135165
Copy link
Copy link
Closed
Labels
A-CLIArea: Command-line interface (CLI) to the compilerArea: Command-line interface (CLI) to the compilerA-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-CLIArea: Command-line interface (CLI) to the compilerArea: Command-line interface (CLI) to the compilerA-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
--sysrootflag rather than takingopts.maybe_sysrootfromOptions::default().