You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it isn't possible to supply flags to rustc that are used solely for build scripts; there's partial support for crates using links, but nothing for the general case. I'd like a way - environment variables are a shortcut, but .cargo/config is probably better as it doesn't pollute child environments - to pass flags to the rustc that builds build.rs and similar build scripts. In may case, this is because my linker and linker paths are NOT the same as the system linker. Why? Oh, because I'm a running a platform with dual glibc and musl libcs... Nasty, I know, but I have little choice. This sort of combination will also happen for platforms that do cross compilation bootstrapping (eg build a sane build toolchain, then use that to cross compiler, so that there is no pollution from the system linker or headers; an example might be linux from scratch). Nasty, but that's life. Currently I work around this by changing rustc to a wrapper script, sniffing for the name of a build crate in the arguments, and then tweaking things, but it's not particularly sane.
The text was updated successfully, but these errors were encountered:
I believe this is a duplicate of #4423-- closing this one since #4423 has more information and a pull request. Please reopen if I'm mistaken! Thank you!
Currently, it isn't possible to supply flags to
rustc
that are used solely for build scripts; there's partial support for crates usinglinks
, but nothing for the general case. I'd like a way - environment variables are a shortcut, but .cargo/config is probably better as it doesn't pollute child environments - to pass flags to therustc
that buildsbuild.rs
and similar build scripts. In may case, this is because my linker and linker paths are NOT the same as the system linker. Why? Oh, because I'm a running a platform with dual glibc and musl libcs... Nasty, I know, but I have little choice. This sort of combination will also happen for platforms that do cross compilation bootstrapping (eg build a sane build toolchain, then use that to cross compiler, so that there is no pollution from the system linker or headers; an example might be linux from scratch). Nasty, but that's life. Currently I work around this by changingrustc
to a wrapper script, sniffing for the name of a build crate in the arguments, and then tweaking things, but it's not particularly sane.The text was updated successfully, but these errors were encountered: