aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 3e69ef1..4202a82 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -1294,11 +1294,13 @@ namespace backend
// TODO: For now zig projects (zig object files) are built with c/c++ compiler,
// they should be built with zig if project only contains zig files.
// But how to combine object files with zig? build-exe only wants to accept .zig files
- string projectGeneratedBinary = "\"";
- projectGeneratedBinary += savePathUtf8;
- projectGeneratedBinary += "/";
+ string projectGeneratedBinary;
if (!sourceFiles.empty() && !zigTest)
{
+ projectGeneratedBinary = "\"";
+ projectGeneratedBinary += savePathUtf8;
+ projectGeneratedBinary += "/";
+
string noUndefinedFlag;
if(!onlyZigFiles)
{