From 8a2cfba6312645ce57720fabaf87ffb58110fc67 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 2 Oct 2018 01:26:31 +0200 Subject: Do not propagate static link flags to parent, also do not use for zig --- backend/ninja/Ninja.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backend/ninja') 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, {}); } -- cgit v1.2.3