diff options
author | ur4t <46435411+ur4t@users.noreply.github.com> | 2023-08-10 23:05:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-08-16 13:52:57 (GMT) |
commit | 3c0f7019908150f30e7f5a3e9e7dddd95b02c7c3 (patch) | |
tree | 3108651036538f5d7fe0aed3ee4ec9118995d029 /Source/cmcmd.cxx | |
parent | e70749e0d65f2bad841de92d3952b9297f326a34 (diff) | |
download | CMake-3c0f7019908150f30e7f5a3e9e7dddd95b02c7c3.zip CMake-3c0f7019908150f30e7f5a3e9e7dddd95b02c7c3.tar.gz CMake-3c0f7019908150f30e7f5a3e9e7dddd95b02c7c3.tar.bz2 |
MSVC: Run manifest tool with llvm-mt compatible arguments
Default use of `llvm-mt` was disabled by commit 73d0d4e4b5 (BinUtils:
Avoid llvm-mt because it is missing 'mt' features we use, 2022-03-08,
v3.23.0-rc3~7^2). However, it can still be specified explicitly by the
user. Due to limitations of LLVM's command line option parser, llvm-mt
does not support arbitrary manifest files following a single switch.
Issue: #23305
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index b18f5cf..2ac9d8e 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -2539,14 +2539,17 @@ int cmVSLink::RunMT(std::string const& out, bool notify) std::vector<std::string> mtCommand; mtCommand.push_back(this->MtPath.empty() ? "mt" : this->MtPath); mtCommand.emplace_back("/nologo"); - mtCommand.emplace_back("/manifest"); // add the linker generated manifest if the file exists. if (this->LinkGeneratesManifest && cmSystemTools::FileExists(this->LinkerManifestFile)) { + mtCommand.emplace_back("/manifest"); mtCommand.push_back(this->LinkerManifestFile); } - cm::append(mtCommand, this->UserManifests); + for (auto const& m : this->UserManifests) { + mtCommand.emplace_back("/manifest"); + mtCommand.push_back(m); + } mtCommand.push_back(out); if (notify) { // Add an undocumented option that enables a special return |