aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 0ba08ab..4162c58 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -1302,7 +1302,7 @@ namespace backend
{
if(config.getCompiler() == Compiler::MINGW_W64)
{
- packagingFlags = "-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic";
+ packagingFlags = "-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic";
}
}
@@ -1401,22 +1401,6 @@ namespace backend
});
}
#endif
- if(config.getCompiler() == Compiler::MINGW_W64)
- {
- buildExeArgs.insert(buildExeArgs.end(), {
- ninja::NinjaArg::createRaw("-lws2_32"),
- ninja::NinjaArg::createRaw("-lwldap32"),
- ninja::NinjaArg::createRaw("-lcrypt32"),
- ninja::NinjaArg::createRaw("-ladvapi32"),
- ninja::NinjaArg::createRaw("-lgdi32"),
- ninja::NinjaArg::createRaw("-luser32"),
- ninja::NinjaArg::createRaw("-luserenv"),
- ninja::NinjaArg::createRaw("-lopengl32"),
- ninja::NinjaArg::createRaw("-lglu32"),
- ninja::NinjaArg::createRaw("-lwinpthread"),
- ninja::NinjaArg::createRaw("-lshell32")
- });
- }
break;
}
case Compiler::MSVC:
@@ -1455,6 +1439,22 @@ namespace backend
buildExeArgs.push_back(ninja::NinjaArg::createRaw(allLinkerFlags));
buildExeArgs.push_back(ninja::NinjaArg::createRaw(packagingFlags));
+ if(config.getCompiler() == Compiler::MINGW_W64)
+ {
+ buildExeArgs.insert(buildExeArgs.end(), {
+ ninja::NinjaArg::createRaw("-lws2_32"),
+ ninja::NinjaArg::createRaw("-lwldap32"),
+ ninja::NinjaArg::createRaw("-lcrypt32"),
+ ninja::NinjaArg::createRaw("-ladvapi32"),
+ ninja::NinjaArg::createRaw("-lgdi32"),
+ ninja::NinjaArg::createRaw("-luser32"),
+ ninja::NinjaArg::createRaw("-luserenv"),
+ ninja::NinjaArg::createRaw("-lopengl32"),
+ ninja::NinjaArg::createRaw("-lglu32"),
+ ninja::NinjaArg::createRaw("-Wl,-Bstatic -lwinpthread"),
+ ninja::NinjaArg::createRaw("-lshell32")
+ });
+ }
ninja::NinjaRule *buildExeRule = ninjaBuildFile.createRule("build_exec", buildExeArgs);
buildExeRule->build(objectNames, executableName, {});
}
@@ -1616,22 +1616,6 @@ namespace backend
});
}
#endif
- if(config.getCompiler() == Compiler::MINGW_W64)
- {
- buildDynamicArgs.insert(buildDynamicArgs.end(), {
- ninja::NinjaArg::createRaw("-lws2_32"),
- ninja::NinjaArg::createRaw("-lwldap32"),
- ninja::NinjaArg::createRaw("-lcrypt32"),
- ninja::NinjaArg::createRaw("-ladvapi32"),
- ninja::NinjaArg::createRaw("-lgdi32"),
- ninja::NinjaArg::createRaw("-luser32"),
- ninja::NinjaArg::createRaw("-luserenv"),
- ninja::NinjaArg::createRaw("-lopengl32"),
- ninja::NinjaArg::createRaw("-lglu32"),
- ninja::NinjaArg::createRaw("-lwinpthread"),
- ninja::NinjaArg::createRaw("-lshell32")
- });
- }
break;
}
case Compiler::MSVC:
@@ -1669,6 +1653,22 @@ namespace backend
buildDynamicArgs.push_back(ninja::NinjaArg::createRaw(allLinkerFlags));
buildDynamicArgs.push_back(ninja::NinjaArg::createRaw(packagingFlags));
+ if(config.getCompiler() == Compiler::MINGW_W64)
+ {
+ buildDynamicArgs.insert(buildDynamicArgs.end(), {
+ ninja::NinjaArg::createRaw("-lws2_32"),
+ ninja::NinjaArg::createRaw("-lwldap32"),
+ ninja::NinjaArg::createRaw("-lcrypt32"),
+ ninja::NinjaArg::createRaw("-ladvapi32"),
+ ninja::NinjaArg::createRaw("-lgdi32"),
+ ninja::NinjaArg::createRaw("-luser32"),
+ ninja::NinjaArg::createRaw("-luserenv"),
+ ninja::NinjaArg::createRaw("-lopengl32"),
+ ninja::NinjaArg::createRaw("-lglu32"),
+ ninja::NinjaArg::createRaw("-Wl,-Bstatic -lwinpthread"),
+ ninja::NinjaArg::createRaw("-lshell32")
+ });
+ }
ninja::NinjaRule *buildDynamicRule = ninjaBuildFile.createRule("build_dynamic", buildDynamicArgs);
buildDynamicRule->build(objectNames, generatedFile, {});
}