banger commit

This commit is contained in:
2026-05-05 23:38:00 +03:00
parent 27435f0fc5
commit fc9f7c05b4
4 changed files with 164 additions and 2 deletions

View File

@@ -2,6 +2,8 @@
-- TODO: script the build
local isBlendi = os.getenv("USER") == "blendi"
local function filename(path)
local s,e = 1, #path
for i = 1,#path do
@@ -29,14 +31,17 @@ local files = {
}
local objects = {}
local coolArgs = {}
if not isBlendi then table.insert(coolArgs, '-fsanitize=undefined,address') end
for i = 1,#files do
local fname = files[i]
local out = "build/" .. filename(fname) .. '.o'
runCommand('clang -c -o ' .. out .. ' ' .. fname)
runCommand('clang -c -o ' .. out .. ' ' .. fname .. ' ' .. table.concat(coolArgs, ' '))
objects[#objects+1] = out;
end
runCommand('clang -o noom ' .. table.concat(objects, ' '))
runCommand('clang -o noom ' .. table.concat(objects, ' ') .. ' ' .. table.concat(coolArgs, ' '))