Skip to content
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

Some sort of support for .cargo/config.toml ? #338

Open
Fuuzetsu opened this issue Mar 20, 2024 · 1 comment
Open

Some sort of support for .cargo/config.toml ? #338

Fuuzetsu opened this issue Mar 20, 2024 · 1 comment

Comments

@Fuuzetsu
Copy link
Contributor

We have something like this in our .cargo/config.toml

[target.'cfg(target_arch="x86_64")']
rustflags = "-Ctarget-feature=+fma,+avx2"

[target.'cfg(target_arch="aarch64")']
rustflags = "-Ctarget-cpu=native"

After crate2nix, on x86_64 there's no mention of those explicit target features. We're currently doing a hack where we manually override all of the crates out of Cargo.nix to re-add these but that's quite manual and generally annoying. It'd be very nice if some basic features were supported. Or at least we should have a closed ticket that's explicit about not supporting this or something.

@Ten0
Copy link

Ten0 commented May 1, 2024

#345 (comment) may be a generic workaround that avoids having to manually operate on each crate, however it is a bit hacky in that it uses cargoNix.internal to identify the list of crates, then specify the flags for each of them individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants