diff options
Diffstat (limited to 'backend/ninja')
-rw-r--r-- | backend/ninja/Ninja.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 7fb07bf..87dd873 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -129,9 +129,9 @@ namespace backend } } - globalLibLinkerFlags += " "; + globalLibLinkerFlags += " '"; globalLibLinkerFlags += globalLibLinkerFlagsResult.unwrap(); - // TODO: If package doesn't exist, download it from github/server + globalLibLinkerFlags += "'"; } } @@ -139,7 +139,8 @@ namespace backend if(pkgConfigLinkerFlagsResult.isErr()) return pkgConfigLinkerFlagsResult; - linkerFlagCallbackFunc(pkgConfigLinkerFlagsResult.unwrap()); + if(!pkgConfigLinkerFlagsResult.unwrap().empty()) + linkerFlagCallbackFunc(pkgConfigLinkerFlagsResult.unwrap()); string allLinkerFlags = pkgConfigLinkerFlagsResult.unwrap(); allLinkerFlags += globalLibLinkerFlags; @@ -193,7 +194,7 @@ namespace backend } default: assert(false); - return Result<bool>::Err("NOT IMPLEMENTED YET!"); + return Result<bool>::Err("Building a dynamic library is not supported yet"); } vector<string> objectNames; @@ -224,8 +225,9 @@ namespace backend string allLinkerFlags; Result<string> linkerFlags = getLinkerFlags(dependencies, [&allLinkerFlags](const string &linkerFlag) { - allLinkerFlags += " "; + allLinkerFlags += " '"; allLinkerFlags += linkerFlag; + allLinkerFlags += "'"; }); if(linkerFlags.isErr()) return Result<bool>::Err(linkerFlags.getErrMsg()); @@ -256,7 +258,7 @@ namespace backend } default: assert(false); - return Result<bool>::Err("NOT IMPLEMENTED YET!"); + return Result<bool>::Err("Building a dynamic library is not supported yet"); } Result<bool> fileOverwriteResult = sibs::fileOverwrite(ninjaBuildFilePath.c_str(), sibs::StringView(result.data(), result.size())); |