]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #53642 - alexcrichton:fix-target-cpu-native, r=arielb1
authorbors <bors@rust-lang.org>
Wed, 29 Aug 2018 02:08:02 +0000 (02:08 +0000)
committerbors <bors@rust-lang.org>
Wed, 29 Aug 2018 02:08:02 +0000 (02:08 +0000)
Fix warnings about the `native` target-cpu

This fixes a regression from #53031 where specifying `-C target-cpu=native` is
printing a lot of warnings from LLVM about `native` being an unknown CPU. It
turns out that `native` is indeed an unknown CPU and we have to perform a
mapping to an actual CPU name, but this mapping is only performed in one
location rather than all locations we inform LLVM about the target CPU.

This commit centralizes the mapping of `native` to LLVM's value of the native
CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's
never `native`.

Closes #53322


Trivial merge