Commit 5fb82764 authored by nanahira's avatar nanahira

add no-longjmp things

parent 7dacdd6d
newoption { trigger = "lua-dir", description = "", value = "PATH", default = "./lua" } newoption { trigger = "lua-dir", description = "", value = "PATH", default = "./lua" }
newoption { trigger = "sqlite3-dir", description = "", value = "PATH" } newoption { trigger = "sqlite3-dir", description = "", value = "PATH" }
newoption { trigger = "no-longjmp", description = "Disable use of longjmp for error handling in Lua" }
boolOptions = { boolOptions = {
"no-lua-safe", "no-lua-safe",
...@@ -33,7 +34,9 @@ workspace "ocgcoredll" ...@@ -33,7 +34,9 @@ workspace "ocgcoredll"
configurations { "Release", "Debug" } configurations { "Release", "Debug" }
platforms { "x64", "x32", "arm64", "wasm" } platforms { "x64", "x32", "arm64", "wasm" }
if not GetParam("no-longjmp") then
defines { "LUA_USE_LONGJMP" } defines { "LUA_USE_LONGJMP" }
end
for _, boolOption in ipairs(boolOptions) do for _, boolOption in ipairs(boolOptions) do
ApplyBoolean(boolOption) ApplyBoolean(boolOption)
...@@ -79,7 +82,7 @@ workspace "ocgcoredll" ...@@ -79,7 +82,7 @@ workspace "ocgcoredll"
filter "system:linux" filter "system:linux"
defines { "LUA_USE_LINUX" } defines { "LUA_USE_LINUX" }
pic "On" pic "On"
linkoptions { "-static-libstdc++", "-static-libgcc" } -- linkoptions { "-static-libstdc++", "-static-libgcc" }
filter "platforms:wasm" filter "platforms:wasm"
toolset "emcc" toolset "emcc"
......
...@@ -5,8 +5,6 @@ project "lua" ...@@ -5,8 +5,6 @@ project "lua"
files { "src/*.c", "src/*.h" } files { "src/*.c", "src/*.h" }
removefiles { "src/lua.c", "src/luac.c", "src/onelua.c" } removefiles { "src/lua.c", "src/luac.c", "src/onelua.c" }
defines { "LUA_USE_LONGJMP" }
if not GetParam("no-lua-safe") then if not GetParam("no-lua-safe") then
removefiles { "src/linit.c" } removefiles { "src/linit.c" }
end end
......
...@@ -28,5 +28,5 @@ project "ocgcore" ...@@ -28,5 +28,5 @@ project "ocgcore"
defines { "LUA_USE_LINUX" } defines { "LUA_USE_LINUX" }
if OCGCORE_DYNAMIC then if OCGCORE_DYNAMIC then
pic "On" pic "On"
linkoptions { "-static-libstdc++", "-static-libgcc" } -- linkoptions { "-static-libstdc++", "-static-libgcc" }
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment