mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-29 04:09:35 +03:00
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.
This commit is contained in:
1 parent
744dd2cccb
commit
59f2aa63e4
1 file changed
+7
-5
@@ -1134,11 +1134,13 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags,
|
||||
std::string const& linkLanguage,
|
||||
cmGeneratorTarget* target)
|
||||
{
|
||||
this->AppendFlags(
|
||||
flags, this->Makefile->GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS"));
|
||||
if (!config.empty()) {
|
||||
std::string name = "CMAKE_STATIC_LINKER_FLAGS_" + config;
|
||||
this->AppendFlags(flags, this->Makefile->GetSafeDefinition(name));
|
||||
if (linkLanguage != "Swift") {
|
||||
this->AppendFlags(
|
||||
flags, this->Makefile->GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS"));
|
||||
if (!config.empty()) {
|
||||
std::string name = "CMAKE_STATIC_LINKER_FLAGS_" + config;
|
||||
this->AppendFlags(flags, this->Makefile->GetSafeDefinition(name));
|
||||
}
|
||||
}
|
||||
this->AppendFlags(flags, target->GetProperty("STATIC_LIBRARY_FLAGS"));
|
||||
if (!config.empty()) {
|
||||
|
||||
Reference in new issue
Block a user