Closed
Description
I have been investigating how to optimize my binaries for the least common denominator across a number of different CPU types (that is, something between the default CPU and target-cpu=native
). In the linked thread, someone pointed me at rustc --print cfg
and I found some relevant documentation in the SIMD docs. However, I found that the output of rustc --target x86_64-unknown-linux-gnu --print target-features
and rustc --print cfg --target x86_64-unknown-linux-gnu
are inconsistent, and the latter outputs features that don't actually work with -Ctarget-feature
. So far, the ones that I noticed are:
bmi
(target-feature) vsbmi1
(cfg)pclmul
vspclmulqdq
rdrnd
vsrdrand
Should the --print cfg
command be updated to print output that's consistent with the target-feature list?
djc-2019 cpu-features rust $ rustc -vV
rustc 1.49.0 (e1884a8e3 2020-12-29)
binary: rustc
commit-hash: e1884a8e3c3e813aada8254edfa120e85bf5ffca
commit-date: 2020-12-29
host: x86_64-apple-darwin
release: 1.49.0