aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-10-02 01:54:54 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commitb62ecb7f87a4eaa66bcded62f44335aa046e05c0 (patch)
treedf0f3c474b36bd50a6e2816a9e693821262a0100 /backend/ninja
parent8a2cfba6312645ce57720fabaf87ffb58110fc67 (diff)
Add missing static flag for packaging, do not use --library c when packaging for zig
Diffstat (limited to 'backend/ninja')
-rw-r--r--backend/ninja/Ninja.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 653d14d..c329c23 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -961,10 +961,13 @@ namespace backend
vector<ninja::NinjaArg> commonZigArgs = {
ninja::NinjaArg::createRaw("-isystem ../../"),
ninja::NinjaArg::createRaw("--color on"),
- ninja::NinjaArg::createRaw("--library c"), // TODO: Remove this if project does not depend on c libraries or project only has .zig files
ninja::NinjaArg::createRaw("$globalIncDirZig")
};
+ // TODO: Remove this if project does not depend on c libraries or project only has .zig files
+ if(!config.packaging)
+ commonZigArgs.push_back(ninja::NinjaArg::createRaw("--library c"));
+
ninja::NinjaVariable zigHeaderFile("headerFile");
vector<ninja::NinjaArg> zigTestArgs = {
ninja::NinjaArg::createRaw("zig test $in --output $out --output-h $headerFile")
@@ -1089,7 +1092,7 @@ namespace backend
{
case Compiler::GCC:
{
- packagingFlags = "-static-libgcc -static-libstdc++";
+ packagingFlags = "-static -static-libgcc -static-libstdc++";
break;
}
case Compiler::MSVC: