Merge topic 'swift-exe-exports'

1e26d57188 Ninja: properly handle exports from Swift exes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4314
This commit is contained in:
Brad King
2020-02-04 13:27:42 +00:00
committed by Kitware Robot
2 changed files with 13 additions and 4 deletions

View File

@@ -551,16 +551,23 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd(
linkCmds.push_back(cmakeCommand + " -E touch $TARGET_FILE");
}
#endif
return linkCmds;
}
} break;
case cmStateEnums::SHARED_LIBRARY:
case cmStateEnums::MODULE_LIBRARY:
break;
case cmStateEnums::EXECUTABLE:
if (this->TargetLinkLanguage(config) == "Swift") {
if (this->GeneratorTarget->IsExecutableWithExports()) {
const std::string flags =
this->Makefile->GetSafeDefinition("CMAKE_EXE_EXPORTS_Swift_FLAG");
cmExpandList(flags, linkCmds);
}
}
break;
default:
assert(false && "Unexpected target type");
}
return std::vector<std::string>();
return linkCmds;
}
void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement(