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
When rustc_flags are given to RustExtension, these flags are used only to build to top-level crate, and not the dependencies (at least for cdylib builds). This is due to using cargo rustc as build command, instead of using cargo build while setting the RUSTFLAGS environment variable (see https://doc.rust-lang.org/cargo/commands/cargo-rustc.html).
Is this behavior a bug ? If not, would you welcome a PR for an additional flag that would be applied to all crates built ?
As an example, my use-case is the flag -C target-feature=+avx2, which has to be applied to the dependencies.
The text was updated successfully, but these errors were encountered:
I had a further thought about this and decided that it's possible there are valid use cases for rustc_flags, so I decided against changing them.
In #260 I documented this behavior and suggest using RUSTFLAGS as above. If an environment variable is inconvenient you can always have a .cargo/config file to set flags.
When
rustc_flags
are given toRustExtension
, these flags are used only to build to top-level crate, and not the dependencies (at least for cdylib builds). This is due to usingcargo rustc
as build command, instead of usingcargo build
while setting theRUSTFLAGS
environment variable (see https://doc.rust-lang.org/cargo/commands/cargo-rustc.html).Is this behavior a bug ? If not, would you welcome a PR for an additional flag that would be applied to all crates built ?
As an example, my use-case is the flag
-C target-feature=+avx2
, which has to be applied to the dependencies.The text was updated successfully, but these errors were encountered: