-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
If you use something like this:
[ build]
rustflags = [
"-C",
"link-args=-Tlayout.ld -nostartfiles"
]
in your .cargo/config, the executable with fail to link because three arguments will be passed to rustc: -C, -link-args=-Tlayout.ld and -nostartfiles. This a problem with Xargo because it uses RUSTFLAGS to pass these (and --sysroot) as a string to Cargo and then Cargo parses RUSTFLAGS by splitting it at whitespaces.
There is no real solution for this other than to use -C link-arg (rust-lang/rust#36574) multiple times instead of -C link-args.
Once that PR lands in rust-lang/rust, let's have Cargo print a warning about this problem and also suggest using -C link-arg instead of -C link-args.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels