From 5f4c554ea7faf393c6c8e293f644efd52f5a1fad Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Sun, 29 Nov 2015 03:03:19 +0000 Subject: [PATCH] Fixed Ninja build invocations to use the right build directory. --- build/scripts/Build.lua | 8 ++++++++ build/scripts/LLVM.lua | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build/scripts/Build.lua b/build/scripts/Build.lua index 8df639ac..8422f733 100644 --- a/build/scripts/Build.lua +++ b/build/scripts/Build.lua @@ -25,6 +25,14 @@ function msbuild(sln, conf) execute(cmd) end +function ninja(dir, action) + local cmd = "ninja -C " .. dir + if action then + cmd = cmd .. " " .. action + end + return execute(cmd) +end + function run_premake(file, action) -- search for file with extension Lua if os.isfile(file .. ".lua") then diff --git a/build/scripts/LLVM.lua b/build/scripts/LLVM.lua index ccbc84ae..59c62f8d 100644 --- a/build/scripts/LLVM.lua +++ b/build/scripts/LLVM.lua @@ -2,7 +2,7 @@ require "Build" require "Utils" require "../Helpers" -local llvm = basedir .. "/../../deps/llvm" +local llvm = basedir .. "/../deps/llvm" -- If we are inside vagrant then clone and build LLVM outside the shared folder, -- otherwise file I/O performance will be terrible. @@ -113,8 +113,8 @@ function build_llvm(llvm_build) msbuild(llvm_sln, conf) else cmake("Ninja", conf) - execute("ninja") - execute("ninja clang-headers") + ninja(llvm_build) + ninja(llvm_build, "clang-headers") end end @@ -189,3 +189,4 @@ if _ACTION == "download_llvm" then download_llvm() os.exit() end +