summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorZsolt Parragi <zsolt.parragi@cancellar.hu>2019-08-13 12:29:48 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-30 15:30:38 (GMT)
commitc856d4556b4ec28cb818ef3c7aca1e4a30e0499d (patch)
treeaf46514551c74f62952d3d2d5cf2ca34171f9a1c /Source/cmNinjaNormalTargetGenerator.cxx
parent079b8e29168dc081f37f79f3577a5c0690bb7051 (diff)
downloadCMake-c856d4556b4ec28cb818ef3c7aca1e4a30e0499d.zip
CMake-c856d4556b4ec28cb818ef3c7aca1e4a30e0499d.tar.gz
CMake-c856d4556b4ec28cb818ef3c7aca1e4a30e0499d.tar.bz2
bindexplib: supporting llvm bitcode formats using llvm-nm
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 17a5527..df4d45d 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"
@@ -974,6 +975,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