From d7438054b7c14ec9481fc44cab7f03a8ab500d3e Mon Sep 17 00:00:00 2001 From: RDW Date: Tue, 7 Jan 2025 07:55:18 +0100 Subject: [PATCH] Build: Fix some bcsave-related warnings on macOS Currently the runtime is compiled in Objective C compatibility mode because of glfw3webgpu, which unfortunately still hasn't been merged upstream yet (see 43dbf1e for context). LuaJIT bytecode objects are passed as C files to the linker, but the runtime is of course a C++ executable - hence the warning. This was previously changed in 8e0af2e when adding support for M1 builds, because the generated bytecode objects were misaligned. I don't know if the alignment issues are still present, but there's only one way to find out... --- BuildTools/BuildTarget.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BuildTools/BuildTarget.lua b/BuildTools/BuildTarget.lua index ceefaed1..a870e94a 100644 --- a/BuildTools/BuildTarget.lua +++ b/BuildTools/BuildTarget.lua @@ -175,7 +175,8 @@ function BuildTarget:ProcessLuaSources() local objectFiles = self.objectFiles for index, luaSourceFilePath in ipairs(self.luaSources) do - local outputFile = string.format("%s/%s.%s", self.BUILD_DIR, luaSourceFilePath, "c") + local outputFile = + string.format("%s/%s.%s", self.BUILD_DIR, luaSourceFilePath, NinjaBuildTools.OBJECT_FILE_EXTENSION) ninjaFile:AddBuildEdge(outputFile, "bcsave " .. luaSourceFilePath) table.insert(objectFiles, outputFile) end