diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ninja/Ninja.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 68b3d05..7bdcbaa 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -1273,7 +1273,12 @@ namespace backend case Compiler::MINGW_W64: case Compiler::GCC: { - packagingFlags = "-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"; + if(usesCFiles) { + packagingFlags += " -static-libgcc"; + } + if(usesCppFiles) { + packagingFlags += " -static-libstdc++ -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"; + } break; } case Compiler::MSVC: @@ -1287,7 +1292,12 @@ namespace backend { if(config.getCompiler() == Compiler::MINGW_W64) { - packagingFlags = "-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"; + if(usesCFiles) { + packagingFlags += " -static-libgcc"; + } + if(usesCppFiles) { + packagingFlags += " -static-libstdc++ -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"; + } } } |