1
Fork 0
rust/compiler/rustc_codegen_llvm/src
bors c87ef0a2fc Auto merge of #80749 - as-com:target-cpu-actually-native, r=nagisa
Make target-cpu=native detect individual features

This PR makes target-cpu=native check for and enable/disable individual features instead of detecting and targeting a CPU by name. This brings the flag's behavior more in line with clang and gcc and ensures that the host actually supports each feature that we are compiling for.

This should resolve issues with miscompilations on e.g. "Haswell" Pentiums and Celerons that lack support for AVX, and also enable support for `aes` on Broadwell processors that support it. It should also resolve issues with failing to detect feature support in newer CPUs that aren't yet known by LLVM (see: #80633).

Fixes #54688
Fixes #48464
Fixes #38218
2021-01-09 04:36:24 +00:00
..
back Make target-cpu=native detect individual features 2021-01-06 03:23:54 -05:00
coverageinfo Fixes to Rust coverage 2020-12-07 17:56:19 -08:00
debuginfo remove unused return types such as empty Results or Options that would always be Some(..) 2020-12-30 13:15:40 +01:00
llvm Use LLVMGetHostCPUFeatures instead of stdsimd 2021-01-07 23:25:19 -05:00
abi.rs Rename prefix_chunk to prefix_chunk_size 2020-11-21 19:22:31 +01:00
allocator.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
asm.rs Add wasm32 support to inline asm 2020-12-01 12:18:21 -06:00
attributes.rs Combination of commits 2020-12-03 09:50:10 -08:00
base.rs Update and improve rustc_codegen_{llvm,ssa} docs 2020-12-22 19:42:23 -08:00
builder.rs Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
callee.rs rustc_target: Rename some target options to avoid tautology 2020-11-08 17:29:13 +03:00
common.rs Update and improve rustc_codegen_{llvm,ssa} docs 2020-12-22 19:42:23 -08:00
consts.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
context.rs Removed an unused function now that LLVM 9 is the minimal supported version 2020-11-12 14:39:47 +01:00
declare.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
intrinsic.rs use strip_prefix over slicing (clippy::manual_strip) 2020-12-11 23:02:17 +01:00
lib.rs Use LLVMGetHostCPUFeatures instead of stdsimd 2021-01-07 23:25:19 -05:00
llvm_util.rs Check if the pointer is null/string is not utf8 2021-01-08 11:50:21 -05:00
metadata.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
mono_item.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
type_.rs Remove MMX from Rust 2020-09-20 15:13:11 +02:00
type_of.rs Revert "cg_llvm: fewer_names in uncached_llvm_type" 2020-12-17 16:40:47 +00:00
va_arg.rs Prefer enum Endian in rustc_target::Target 2021-01-06 13:34:19 +00:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00