-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative to RUSTFLAGS that allows spaces within arguments #3686
Comments
If you're not willing to use Also I'm not so sure about xargo :( |
Thanks.
That seems a little bit excessive, but I guess it's possible. If parsing quoted If I'm not mistaken one of the goals for Cargo in 2017 is better integration into other build systems. Not having any (non-destructive) way to pass custom arguments with spaces to the compiler seems pretty limiting in this respect. No straightforward way to obtain the paths of generated artefacts is another. For now, I'll go with your solution of creating a wrapper around the compiler.
Looking through the source code, xargo does not seem to interpret I'm also wondering. Is there any difference between |
Yeah I'd be totally open to alternatives here in how to define env vars, and something like Also for now RUSTC == CARGO_BUILD_RUSTC, we just added the former first and the latter fell out of blanket "read config from env vars as well" |
You can do this today with |
Closing as this is mostly resolved now. There are several mechanisms for setting flags that have spaces in them:
|
I'm working on a build tool for setting up a cargo environment to build projects that depend on Arduino cores and libraries. It detects the target architecture, compiler locations and arguments, linker location and arguments and a bunch of other stuff that needs to be passed to
rustc
based on a given Arduino board specification. Currently I pass these arguments using theRUSTFLAGS
environment variable, Things like the linker path and linker script can point to arbitrary files on the file system and can thus contains spaces. NeitherRUSTFLAGS
norCARGO_BUILD_RUSTFLAGS
support spaces in arguments and generating a.cargo/config
file that could possibly overwrite a user specified config file is also not an option. What are my options?And another question. Does the
CARGO_BUILD_TARGET
variable not work or could this be a problem onxargo
's end?Thanks!
The text was updated successfully, but these errors were encountered: