Skip to content

Commit 2f0f668

Browse files
Rawan10101natecraddock
authored andcommitted
build: add -flto for wasm32 to fix setjmp/longjmp with Emscripten
1 parent d59103e commit 2f0f668

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

build/lua.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ pub fn configure(
7575
if (target.result.os.tag == .windows and shared) "-DLUA_BUILD_AS_DLL" else "",
7676

7777
if (lua_user_h) |_| b.fmt("-DLUA_USER_H=\"{s}\"", .{user_header}) else "",
78+
if (target.result.cpu.arch == .wasm32) "-flto" else "",
7879
};
7980

8081
const lua_source_files = switch (lang) {

0 commit comments

Comments
 (0)