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
The changes in #50 does not apply to build scripts. For example, when compiling the chess crate with [build] rustflags = ["-C", "target-cpu=native"] in .cargo/config.toml and running cargo pgo build -- --verbose, it produces several compiler error due to some code not generated in the build script due to missing CPU features when compiling the build script. There are probably more crates that are affected by this.
Edit: was doing RUSTFLAGS="-C target-cpu=native" cargo pgo build -- --verbose, but both are not working
The text was updated successfully, but these errors were encountered:
funnsam
changed the title
RUSTFLAGS in .cargo/config.toml is not respected when compiling build scripts
RUSTFLAGS in .cargo/config.toml or environment variable is not respected when compiling build scripts
Dec 15, 2024
The situation with RUSTFLAGS is... complicated, to say the least. cargo-pgo uses [target.'cfg(all())'] instead of [build], because it has a higher precedence.
Could you try replacing [build] rustflags with [target.'cfg(all())'] rustflags? Then the flags should be properly combined.
The changes in #50 does not apply to build scripts. For example, when compiling the
chess
crate with[build] rustflags = ["-C", "target-cpu=native"]
in.cargo/config.toml
and runningcargo pgo build -- --verbose
, it produces several compiler error due to some code not generated in the build script due to missing CPU features when compiling the build script. There are probably more crates that are affected by this.Edit: was doing
RUSTFLAGS="-C target-cpu=native" cargo pgo build -- --verbose
, but both are not workingThe text was updated successfully, but these errors were encountered: