You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually Zig isn't enabling LTO on release targets ( wasm32 in particular). Enabling it manually gives this warning during linking.
$ zig build run-clear -Dtarget=wasm32-emscripten -Doptimize=ReleaseSmall
run-clear
└─ run /home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/emrun
└─ install generated/
└─ emcc stderr
wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/sokol-zig/.zig-cache/o/b17f1f6a7714e069fb53b8a52b736ac9/libsokol_clib.a(sokol_app.o at 20300)' is 'wasm32-unknown-emscripten-musl' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten'
wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/sokol-zig/.zig-cache/o/b17f1f6a7714e069fb53b8a52b736ac9/libsokol_clib.a(sokol_glue.o at 379232)' is 'wasm32-unknown-emscripten-musl' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten'
wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/sokol-zig/.zig-cache/o/b17f1f6a7714e069fb53b8a52b736ac9/libsokol_clib.a(sokol_gfx.o at 95292)' is 'wasm32-unknown-emscripten-musl' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten'
wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/sokol-zig/.zig-cache/o/b17f1f6a7714e069fb53b8a52b736ac9/libsokol_clib.a(sokol_log.o at 11768)' is 'wasm32-unknown-emscripten-musl' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten'
Replace wasm32-emscripten (default is musl) to wasm32-emscripten-none!
# first clean .zig-cache and zig-out
$ zig build run-clear -Dtarget=wasm32-emscripten-none -Doptimize=ReleaseSmall
Now listening at http://0.0.0.0:6931/
The text was updated successfully, but these errors were encountered:
Actually Zig isn't enabling LTO on release targets ( wasm32 in particular). Enabling it manually gives this warning during linking.
Similar issue in
sokol-d
: kassane/sokol-d#3 (comment)How to fix?
Replace
wasm32-emscripten
(default is musl) towasm32-emscripten-none
!# first clean .zig-cache and zig-out $ zig build run-clear -Dtarget=wasm32-emscripten-none -Doptimize=ReleaseSmall Now listening at http://0.0.0.0:6931/
The text was updated successfully, but these errors were encountered: