Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Query compiler optimizations for target-cpus
I had a question, but was able to find an answer and thought I would write it down here in case anyone else has use for it (hello, future self โ I see I forgot I had already looked this up, again).
Basically we were looking at some optimizations the other day and wondered if there was some way to easily be able to see what version of simd optimizations could/would be used, given a target-cpu
.
First use rustc โprint target-cpus
to get a list of recognized cpu types. Next, given a target-cpu
, run rustc โprint cfg -C target-cpu=<target-cpu>
, which will show what cfgโs will be set by the compiler for that target-cpu
, which includes simd types.
2 posts - 2 participants
๐ท๏ธ Rust_feed