diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-02 01:26:31 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:33 +0200 |
commit | 8a2cfba6312645ce57720fabaf87ffb58110fc67 (patch) | |
tree | 9b3c83ad759c4c9d94bdb696d8c8478413edb349 /backend | |
parent | 030af5f3754dba5872c35754c34c6d40a059c91c (diff) |
Do not propagate static link flags to parent, also do not use for zig
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ninja/Ninja.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 943e090..653d14d 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -1082,13 +1082,14 @@ namespace backend objectNames.emplace_back(move(objectName)); } + string packagingFlags; if(config.packaging) { switch(config.getCompiler()) { case Compiler::GCC: { - allLinkerFlags += " -static-libgcc -static-libstdc++"; + packagingFlags = "-static-libgcc -static-libstdc++"; break; } case Compiler::MSVC: @@ -1219,6 +1220,7 @@ namespace backend if (!allLinkerFlags.empty()) buildExeArgs.push_back(ninja::NinjaArg::createRaw(allLinkerFlags)); + buildExeArgs.push_back(ninja::NinjaArg::createRaw(packagingFlags)); ninja::NinjaRule *buildExeRule = ninjaBuildFile.createRule("build_exec", buildExeArgs); buildExeRule->build(objectNames, executableName, {}); } @@ -1412,6 +1414,7 @@ namespace backend if (!allLinkerFlags.empty()) buildDynamicArgs.push_back(ninja::NinjaArg::createRaw(allLinkerFlags)); + buildDynamicArgs.push_back(ninja::NinjaArg::createRaw(packagingFlags)); ninja::NinjaRule *buildDynamicRule = ninjaBuildFile.createRule("build_dynamic", buildDynamicArgs); buildDynamicRule->build(objectNames, generatedFile, {}); } |