Commit b66678b
authored
Fix LTO Detection in LLVM Intrinsic Build (#36)
Fixes #33
This PR fixes LTO detection in the LLVM intrinsic build script. It turns
out that around Rust 1.55, `cargo` stopped propagating `RUSTFLAGS`
environment variable to the build script invocation (and even actively
removing it). It is replaced with `CARGO_ENCODED_RUSTFLAGS` which is
meant to more accurately set the actual `rustc` flags that are being
used.
Turning this on yields an immediate improvement in benchmarks:
```
U256::add time: [15.726 ns 15.764 ns 15.808 ns]
change: [-34.507% -34.304% -34.099%] (p = 0.00 < 0.05)
Performance has improved.
```1 parent 1cd9388 commit b66678b
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
0 commit comments