summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-05-23 21:05:37 (GMT)
committerSaleem Abdulrasool <compnerd@compnerd.org>2019-05-23 21:05:37 (GMT)
commit9e5457d3b4f5c46028c29d731f4057e3fa76415a (patch)
tree0d2275a67f15dea931d1c8d7ff2a4972c44af942 /Source/cmNinjaNormalTargetGenerator.cxx
parentf03a80aefd4073bc1502c2e486fedfdbd8addfb6 (diff)
downloadCMake-9e5457d3b4f5c46028c29d731f4057e3fa76415a.zip
CMake-9e5457d3b4f5c46028c29d731f4057e3fa76415a.tar.gz
CMake-9e5457d3b4f5c46028c29d731f4057e3fa76415a.tar.bz2
Ninja,Swift: correct response file handling
The response file was being written but not used due to the wrong variable being configured for Swift. Swift does compile+link in a single phase and does not use the `<OBJECTS>` placeholder. Use the `<SWIFT_SOURCES>` placeholder instead for the response file substitution which serves the same purpose.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 1e4d2ed..77af45e 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -321,7 +321,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
rspcontent = "$in_newline";
}
rspcontent += " $LINK_PATH $LINK_LIBRARIES";
- vars.Objects = responseFlag.c_str();
+ if (this->TargetLinkLanguage == "Swift") {
+ vars.SwiftSources = responseFlag.c_str();
+ } else {
+ vars.Objects = responseFlag.c_str();
+ }
vars.LinkLibraries = "";
}