From b62ecb7f87a4eaa66bcded62f44335aa046e05c0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 2 Oct 2018 01:54:54 +0200 Subject: Add missing static flag for packaging, do not use --library c when packaging for zig --- backend/ninja/Ninja.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'backend') 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 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 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: -- cgit v1.2.3