Merge topic 'clang-ipo-support'

dca9c33abc Tests: Remove old IPO test
c856d4556b bindexplib: supporting llvm bitcode formats using llvm-nm
079b8e2916 Clang: prefer lld-link over link.exe
6e3655db2c Clang: add LTO support for GNU-command line clang on windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3527
This commit is contained in:
Brad King
2019-09-03 13:34:01 +00:00
committed by Kitware Robot
15 changed files with 170 additions and 23 deletions

View File

@@ -20,6 +20,7 @@
#include "cmGlobalNinjaGenerator.h"
#include "cmLinkLineComputer.h"
#include "cmLinkLineDeviceComputer.h"
#include "cmLocalCommonGenerator.h"
#include "cmLocalGenerator.h"
#include "cmLocalNinjaGenerator.h"
#include "cmMakefile.h"
@@ -976,6 +977,13 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
std::string obj_list_file = mdi->DefFile + ".objs";
cmd += this->GetLocalGenerator()->ConvertToOutputFormat(
obj_list_file, cmOutputConverter::SHELL);
const char* nm_executable = GetMakefile()->GetDefinition("CMAKE_NM");
if (nm_executable && *nm_executable) {
cmd += " --nm=";
cmd += this->LocalCommonGenerator->ConvertToOutputFormat(
nm_executable, cmOutputConverter::SHELL);
}
preLinkCmdLines.push_back(std::move(cmd));
// create a list of obj files for the -E __create_def to read