-
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
Provide a way to specify configuration for host compilation #5754
Comments
Thanks for this report and #5755 @luser, this is definitely not something that was expected to come up! Out of curiosity, when you compile in Gecko are you doing That is, I think we could pretty easily do something like this for If, however In any case, if Cargo supports this environment variable I think it'd be totally reasonable for |
Oh actually I guess most of that comment would be more appropriate on #5755 rather than here! (I think I'm getting the two mixed up). For Cargo's configuration do you use |
We always pass |
How do you set RUST_HOST_TARGET in your script? Is there an easy way to detect this? Ideally if rust is invoked without a target it should build with the host target but it seems to build with the last target used for me :/ |
cargo currently supports specifying configuration per-target. Unfortunately, for non-cross-compiles this can lead to undesirable behavior. For example, we build Firefox in many variant configurations, several of which involve passing compiler and linker options that are useful for target binaries but cause problems when used for building things like build scripts. The simplest example here is address sanitizer--we want to compile and link with
-fsanitize=address
, but linking build scripts with that means they're now running with asan and that's not something we want to do. We have the same problem with our code coverage builds, which compile and link with--coverage
.It would be better if we had a way to explicitly configure host compilation. The simplest proposal I can think of would be to support
[host.$triple]
keys in config files and use those for host compilation.The text was updated successfully, but these errors were encountered: