-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
problems with -C link-args
that have arguments with spaces
#45
Comments
@japaric: Small reminder in response to your last paragraph: the PR has landed. |
A small note for anyone who stumbles across this via google. If you need multiple args, the first arg must not have
|
46: Fix warning about implicit trait objects r=phil-opp a=phil-opp Fixes japaric#45 Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
As one of those people who stumbled across @flukejones comment, which was very helpful: I'm not sure what all of the |
If you use something like this:
in your
.cargo/config
, the executable with fail to link because three arguments will be passed torustc
:-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
.The text was updated successfully, but these errors were encountered: