summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-03 13:34:01 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-03 13:39:03 (GMT)
commit4684e64c84d49d9152ebab42c8bc4ffa57652041 (patch)
treee11975348641bcc2da212e491b75e4f181aeaa72 /Source/cmNinjaNormalTargetGenerator.cxx
parent54b69bd6426bffae6ba11b4d0d95a4ad8c31b309 (diff)
parentdca9c33abc7ce6b041b378e1ebc43c35327027b3 (diff)
downloadCMake-4684e64c84d49d9152ebab42c8bc4ffa57652041.zip
CMake-4684e64c84d49d9152ebab42c8bc4ffa57652041.tar.gz
CMake-4684e64c84d49d9152ebab42c8bc4ffa57652041.tar.bz2
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
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 0e3aa3a..6c23846 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -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