rustc --print cfg prints features that are invalid for -Ctarget-feature
#81881
Labels
C-bug
Category: This is a bug.
-Ctarget-feature
#81881
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 atrustc --print cfg
and I found some relevant documentation in the SIMD docs. However, I found that the output ofrustc --target x86_64-unknown-linux-gnu --print target-features
andrustc --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?The text was updated successfully, but these errors were encountered: