Commit 59f2aa63 authored by Saleem Abdulrasool's avatar Saleem Abdulrasool

Swift: fix static library handling

Handle static libraries similar to shared libraries.  Do not pass along
the shared library flags raw as that will pass flags for the linker to
the driver which is incorrect.
parent 744dd2cc
...@@ -1134,11 +1134,13 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags, ...@@ -1134,11 +1134,13 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags,
std::string const& linkLanguage, std::string const& linkLanguage,
cmGeneratorTarget* target) cmGeneratorTarget* target)
{ {
this->AppendFlags( if (linkLanguage != "Swift") {
flags, this->Makefile->GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS")); this->AppendFlags(
if (!config.empty()) { flags, this->Makefile->GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS"));
std::string name = "CMAKE_STATIC_LINKER_FLAGS_" + config; if (!config.empty()) {
this->AppendFlags(flags, this->Makefile->GetSafeDefinition(name)); std::string name = "CMAKE_STATIC_LINKER_FLAGS_" + config;
this->AppendFlags(flags, this->Makefile->GetSafeDefinition(name));
}
} }
this->AppendFlags(flags, target->GetProperty("STATIC_LIBRARY_FLAGS")); this->AppendFlags(flags, target->GetProperty("STATIC_LIBRARY_FLAGS"));
if (!config.empty()) { if (!config.empty()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment