Merge remote-tracking branch 'origin/master' into runtime_compile_v5

This commit is contained in:
Ivan 2017-10-01 17:02:50 +03:00
commit 808f36b2d2
46 changed files with 1060 additions and 374 deletions

View file

@ -118,8 +118,9 @@ void ArgsBuilder::addLTOGoldPluginFlags() {
if (opts::isUsingThinLTO())
addLdFlag("-plugin-opt=thinlto");
if (!opts::mCPU.empty())
addLdFlag(llvm::Twine("-plugin-opt=mcpu=") + opts::mCPU);
const auto cpu = gTargetMachine->getTargetCPU();
if (!cpu.empty())
addLdFlag(llvm::Twine("-plugin-opt=mcpu=") + cpu);
// Use the O-level passed to LDC as the O-level for LTO, but restrict it to
// the [0, 3] range that can be passed to the linker plugin.