Skip to content

Commit

Permalink
Update NinjaBuildTools.lua
Browse files Browse the repository at this point in the history
Update BuildTarget.lua

Update NinjaBuildTools.lua
  • Loading branch information
rdw-software committed Jan 7, 2025
1 parent e7e03b0 commit 86cfcc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BuildTools/BuildTarget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function BuildTarget:ProcessLuaSources()

for index, luaSourceFilePath in ipairs(self.luaSources) do
local outputFile =
string.format("%s/%s.%s", self.BUILD_DIR, luaSourceFilePath, NinjaBuildTools.OBJECT_FILE_EXTENSION)
string.format("%s/%s.%s", self.BUILD_DIR, luaSourceFilePath, ".cpp")
ninjaFile:AddBuildEdge(outputFile, "bcsave " .. luaSourceFilePath)
table.insert(objectFiles, outputFile)
end
Expand Down
10 changes: 7 additions & 3 deletions BuildTools/NinjaBuildTools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ local C_BuildTools = {
displayName = "GNU Compiler Collection",
C_COMPILER = "gcc",
CPP_COMPILER = "g++",
COMPILER_FLAGS_CPP = DEFAULT_COMPILER_FLAGS .. " -std=c++20" .. (isMacOS and " -Wl,-ld_classic -Wl,-no_deduplicate" or ""),
COMPILER_FLAGS_CPP = DEFAULT_COMPILER_FLAGS
.. " -std=c++20"
.. (isMacOS and " -Wl,-ld_classic -Wl,-no_deduplicate" or ""),
-- Forced ObjC compilation should be removed once glfw3webgpu is merged into the GLFW core library
COMPILER_FLAGS_C = DEFAULT_COMPILER_FLAGS .. " -std=c11" .. (isMacOS and " -ObjC -Wl,-ld_classic -Wl,-no_deduplicate" or ""),
COMPILER_FLAGS_C = DEFAULT_COMPILER_FLAGS
.. " -std=c11"
.. (isMacOS and " -ObjC -Wl,-ld_classic -Wl,-no_deduplicate" or ""),
C_LINKER = "gcc",
CPP_LINKER = "g++",
-- Must export the entry point of bytecode objects so that LuaJIT can load them via require()
LINKER_FLAGS = isWindows and "-Wl,--export-all-symbols" or "-rdynamic",
LINKER_FLAGS = isWindows and "-Wl,--export-all-symbols" or "-rdynamic -no_deduplicate",
C_ARCHIVER = "ar",
CPP_ARCHIVER = "ar",
ARCHIVER_FLAGS = "-rcs",
Expand Down

0 comments on commit 86cfcc2

Please sign in to comment.