-
Notifications
You must be signed in to change notification settings - Fork 453
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
Mechanism for automatically passing flags used by rustc #1254
Comments
Thanks, we definitely want more data to be fetcher from cargoz Can you provide more details on what rustc/cargo flags it is? |
The specific case I'm coming at this with is |
Thanks that's a good idea, I would accept a PR for it. |
Sounds good, will write up a PR then.
Or should we have this done by default with some opt-out? |
I think opt-out makes more sense, or maybe we don't even need an opt-out mechanism. AFAIK the current cargo env usage does not have any opt-out mechanism. |
List of codegen options that could be interesting (I'm going through the list of rustc's
|
When cc-rs is running in a build script, it currently does not check which flags were passed to rustc.
There are some flags which in order to be fully effective need to be passed to both rustc and cc, a good example being AArch64 branch protection - if the Rust code is built with BTI but the C component is not, that will disable BTI for the whole binary.
Would some mechanism for checking which flags were passed to rustc and determining their corresponding cc flags be desirable to have? This could either be in the form of adding them in automatically, a separate function such as
inherit_rustc_flags()
or even just a warning to the user that some flags that should match don't match.I'm thinking about implementing something along the lines of what I described above, but I wanted to ask for some thoughts from people who work on this crate. Is this desirable in the first place? If so, roughly what direction should I go in with this?
The text was updated successfully, but these errors were encountered: