summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-01-09 15:53:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-01-09 15:53:59 (GMT)
commit7557a722a5126bef9ac6f5802b62be959a422910 (patch)
tree3daaa3f8ee7e31fbc2b01088777ffc898fb88c23 /Source
parent1c97c57455fd6672cef8a23b57aea502864090eb (diff)
parenta6a5c433005be3cceab05f088dbd8fe8ffce3540 (diff)
downloadCMake-7557a722a5126bef9ac6f5802b62be959a422910.zip
CMake-7557a722a5126bef9ac6f5802b62be959a422910.tar.gz
CMake-7557a722a5126bef9ac6f5802b62be959a422910.tar.bz2
Merge topic 'ewilde/swift-ninja-response-files'
a6a5c43300 Swift/Ninja: Add support for response files Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9098
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx6
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
2 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 99ea009..d365ef6 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -453,7 +453,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile,
vars.Language = lang.c_str();
vars.AIXExports = "$AIX_EXPORTS";
- if (this->TargetLinkLanguage(config) == "Swift") {
+ if (!this->GetLocalGenerator()->IsSplitSwiftBuild() &&
+ this->TargetLinkLanguage(config) == "Swift") {
vars.SwiftLibraryName = "$SWIFT_LIBRARY_NAME";
vars.SwiftModule = "$SWIFT_MODULE";
vars.SwiftModuleName = "$SWIFT_MODULE_NAME";
@@ -508,7 +509,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile,
vars.LinkLibraries = "$LINK_PATH $LINK_LIBRARIES";
}
- if (this->TargetLinkLanguage(config) == "Swift") {
+ if (!this->GetLocalGenerator()->IsSplitSwiftBuild() &&
+ this->TargetLinkLanguage(config) == "Swift") {
vars.SwiftSources = responseFlag.c_str();
} else {
vars.Objects = responseFlag.c_str();
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index a0651ee..c493778 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -2028,6 +2028,7 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement(
std::string const targetObjectFilename = this->ConvertToNinjaPath(cmStrCat(
objectDir, '/', moduleName,
this->GetGlobalGenerator()->GetLanguageOutputExtension(language)));
+ objBuild.RspFile = cmStrCat(targetObjectFilename, ".swift.rsp");
if (isSingleOutput) {
this->LocalGenerator->AppendFlags(vars["FLAGS"],
@@ -2087,7 +2088,8 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement(
// Write object build
this->GetGlobalGenerator()->WriteBuild(this->GetImplFileStream(fileConfig),
- objBuild);
+ objBuild,
+ this->ForceResponseFile() ? -1 : 0);
}
void cmNinjaTargetGenerator::WriteTargetDependInfo(std::string const& lang,