kassane / sokol-d

D bindings for the sokol headers (https://github.com/floooh/sokol)
http://sokol-d.dub.pm/
zlib License
11 stars 5 forks source link

Roadmap #3

Closed kassane closed 1 month ago

kassane commented 11 months ago

External Reference

kassane commented 10 months ago

Improvement LDC support

All flags: https://github.com/ldc-developers/ldc/blob/master/driver%2Fcl_options.cpp https://github.com/dlang/dub/blob/master/source%2Fdub%2Fcompilers%2Fldc.d

Upstream issues

kassane commented 6 months ago

Based on some information, it is expected to improve support for nogc and/or betterC. Currently the user_data example requires GC because of AA (associative array)

kassane commented 5 months ago

Improvement wasm support

The latest changes are intended to remove support for custom-Druntime (obsolete and incomplete). Only wasm32-target as betterC will be allowed. #20 This needs to be re-tested and improved.

However, for a higher priority, it is still necessary to resolve the linking conflicts of the objects generated by ldmd2/ldc2

Note: ldmd2 is just the wrapper for the ldc2 compiler, using the dmd flags (ldc2 -ldmd - w/ dmd library).

Building wasm-target involves what steps?

Four steps (current)

Build tests

In the following, I have tested it manually (no zig build system).

ldc2-wasm (manual build-test) ```bash # sokol-d path == pwd $ mkdir $PWD/build $ ldc2 -ldmd -c -w -preview=all -Oz -release -enable-inlining -boundscheck=off -vcolumns -od=$PWD/build -cache=/home/kassane/sokol-d/zig-cache/o/27f92344914739129514f9188caf365b -oq -disable-verify -Hkeep-all-bodies -i -I/home/kassane/sokol-d/src /home/kassane/sokol-d/src/examples/clear.d --d-version=CarelessAlocation -L-allow-undefined -Xcc=-v -P-I/home/kassane/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/include -Xcc=-DIMPL -Xcc=-DSOKOL_GLES3 -mtriple=wasm32-unknown-unknown-wasm /home/kassane/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a -flto=thin $ tree build build └── examples.clear.o 1 directory, 1 file $ mkdir $PWD/build/web $ $HOME/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/emcc -sASSERTIONS=0 -Oz -flto --closure 1 -sUSE_WEBGL2=1 -sNO_FILESYSTEM=1 -sMALLOC='emmalloc' --shell-file=src/sokol/web/shell.html -o$PWD/build/web/clear.html -sUSE_OFFSET_CONVERTER=1 $PWD/build/examples.clear.o /home/kassane/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libGL-webgl2-getprocaddr.a(webgl1.o at 11618)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-unknown-wasm' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(abort.o at 342416)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-unknown-wasm' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(library_pthread_stub.o at 2939600)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-unknown-wasm' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(roundf.o at 4345288)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-unknown-wasm' # [...] SKIP (SAME warnings) $ tree build build ├── examples.clear.o └── web ├── clear.html ├── clear.js └── clear.wasm 2 directories, 4 files ``` **Output:** Black screen!! :cry:
ldc2-wasm (manual build-test) ```bash $ ldmd2 -c -w -preview=all -Oz -release -enable-inlining -boundscheck=off -vcolumns -od=$PWD/build -oq -disable-verify -Hkeep-all-bodies -i -I$HOME/sokol-d/src $HOME/sokol-d/src/examples/clear.d -L-allow-undefined -Xcc=-v -P-I$HOME/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/include -Xcc=-DIMPL -Xcc=-DSOKOL_GLES3 -mtriple=wasm32-unknown-unknown-wasm $HOME/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a $ zig build-obj $PWD/build/examples.clear.o /home/kassane/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a -OReleaseSmall -target wasm32-emscripten -mcpu baseline -I /home/kassane/sokol-d/zig-cache/o/6f5a8a62c22680ad92a78d948ac77f24 -lc --name clear -femit-bin=$PWD/build/clear.o -static $ tree build build ├── clear.o ├── examples.clear.o └── web $HOME/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/emcc -sASSERTIONS=0 -Oz -flto --closure 1 -sUSE_WEBGL2=1 -sNO_FILESYSTEM=1 -sMALLOC='emmalloc' --shell-file=src/sokol/web/shell.html -o$PWD/build/web/clear.html -sUSE_OFFSET_CONVERTER=1 $PWD/build/clear.o $HOME/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a wasm-ld: warning: function signature mismatch: sg_make_shader >>> defined as (i32, i32) -> void in /home/kassane/sokol-d/build/clear.o >>> defined as (i32) -> i32 in /home/kassane/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a(/home/kassane/sokol-d/zig-cache/o/54cced09d05b5ad8e831190d0960f355/sokol_gfx.o) wasm-ld: warning: function signature mismatch: sg_make_buffer >>> defined as (i32, i32) -> void in /home/kassane/sokol-d/build/clear.o >>> defined as (i32) -> i32 in /home/kassane/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a(/home/kassane/sokol-d/zig-cache/o/54cced09d05b5ad8e831190d0960f355/sokol_gfx.o) wasm-ld: warning: function signature mismatch: sg_gl_query_shader_info >>> defined as (i32, i32) -> void in /home/kassane/sokol-d/build/clear.o >>> defined as (i32) -> i32 in /home/kassane/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a(/home/kassane/sokol-d/zig-cache/o/54cced09d05b5ad8e831190d0960f355/sokol_gfx.o) wasm-ld: warning: function signature mismatch: sg_d3d11_query_sampler_info >>> defined as (i32, i32) -> void in /home/kassane/sokol-d/build/clear.o >>> defined as (i32) -> i32 in /home/kassane/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a(/home/kassane/sokol-d/zig-cache/o/54cced09d05b5ad8e831190d0960f355/sokol_gfx.o) # [...] SKIP (same warnings) $ tree build build ├── clear.o ├── examples.clear.o └── web ├── clear.html ├── clear.js └── clear.wasm 2 directories, 5 files ``` **Output:** Works :partying_face:
ldc2-wasm (manual build-test) ```bash # sokol-d path == pwd $ mkdir -p build/web $ ldmd2 -c -w -preview=all -Oz -release -enable-inlining -boundscheck=off -vcolumns -od=$PWD/build -oq -disable-verify -Hkeep-all-bodies -i -I$HOME/sokol-d/src $HOME/sokol-d/src/examples/clear.d -L-allow-undefined -Xcc=-v -P-I$HOME/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/include -Xcc=-DIMPL -Xcc=-DSOKOL_GLES3 -mtriple=wasm32-unknown-unknown-wasm $HOME/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a -gcc=$HOME/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/emcc --linker=$HOME/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/emcc -P-sASSERTIONS=0 -Xcc=-Oz -Xcc="--closure 1" -P-sUSE_WEBGL2=1 -P-sNO_FILESYSTEM=1 -P-sMALLOC='emmalloc' -Xcc=--shell-file=src/sokol/web/shell.html -Xcc=-o$PWD/build/web/clear.html -P-sUSE_OFFSET_CONVERTER=1 -flto=full $ $HOME/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/emcc -sASSERTIONS=0 -Oz --closure 1 -sUSE_WEBGL2=1 -sNO_FILESYSTEM=1 -sMALLOC='emmalloc' --shell-file=src/sokol/web/shell.html -o$PWD/build/web/clear.html -sUSE_OFFSET_CONVERTER=1 $PWD/build/examples.clear.o $HOME/sokol-d/zig-cache/o/e35346434b3113a9d28288ab4edc2b5d/libsokol.a # [...] *NO Warnings* $ tree build build ├── clear.o ├── examples.clear.o └── web ├── clear.html ├── clear.js └── clear.wasm 2 directories, 5 files ``` **Output:** Works :partying_face:

Note 2: LTO between ldc2 and emcc cause warnings. Prefer enable LTO in ldc2 only (no or minimum warnings)!!

wasm-ld: warning: Linking two modules of different data layouts: '/home/kassane/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(llrintl.o at 2994444)' is 'e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20' whereas 'ld-temp.o' is 'e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20'

cc: @floooh

floooh commented 5 months ago

Just FIY, I'll be travelling until Thursday and will probably be unresponsive during that time.

kassane commented 5 months ago

Just FIY, I'll be travelling until Thursday and will probably be unresponsive during that time.

No trouble! Enjoy your travels.


Note 2: LTO between ldc2 and emcc cause warnings. Prefer enable LTO in ldc2 only (no or minimum warnings)!!

After fix ldc2 (master) issue (add wasm32-unknown-emscripten)... I have discovered a strange situation, in that when enabling LTO on all in release mode.

warning: Linking two modules of different target triples: '/home/kassane/sokol-d/zig-cache/o/11f2f18f48ea24e538f790ad4c0e12f8/libsokol.a(sokol_gfx.o at 101382)' is 'wasm32-unknown-emscripten-musl' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten'

wasm32-unknown-emscripten-musl ?? Maybe based on wasi target. The issue is fixed (without warnings) when passing -Dtarget=wasm32-emscripten-none.

kassane commented 5 months ago

After new updates and the possible inclusion of imgui support. As you can see, build.zig is quite long and complicated.

Unlike the sokol-zig approach (by @floooh), sokol-d has everything included, which requires extending the support in build.zig. So far, the port of pacman.c/pacman.zig to pacman.d is in progress, as a first external solution using sokol-d.

Any suggestions for other approaches to reduce such complexity?

Maybe pacman.d can serve as a reference.

kassane commented 3 months ago
kassane commented 2 months ago

The next ldc2 version brings improved wasm32-emscripten-musl support.

Emscripten: The compiler now mimicks a musl Linux platform wrt. extra predefined versions.

More info: https://forum.dlang.org/post/xmrqpocmcfwpajxvzfal@forum.dlang.org


Remember: Currently, the wasm32 target in this project has LTO enabled (ldc2/zig cc/emcc) in release mode.

However, wasm32-emscripten and wasm32-wasi in Zig links musl-libc by default. Causing conflict on the part of the object generated by ldc2 and sokol library. Add -none in wasm triple-target to bypass linker error.

This compiler improvement, it might help linking with musl-libc on LTO enabled. In debug mode (LTO off) emit warnings yet!

kassane commented 2 months ago

Previous test

Note 2: LTO between ldc2 and emcc cause warnings. Prefer enable LTO in ldc2 only (no or minimum warnings)!!

wasm-ld: warning: Linking two modules of different data layouts: '/home/kassane/.cache/zig/p/122083537ec3463ee4b2d520bf86a36b1057ab05abfe712c32bae1048f9b0c6e2a13/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(llrintl.o at 2994444)' is 'e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20' whereas 'ld-temp.o' is 'e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20'

Current test

The next ldc2 version brings improved wasm32-emscripten-musl support.

Emscripten: The compiler now mimicks a musl Linux platform wrt. extra predefined versions.

$ 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-d/.zig-cache/o/10eb24f94f096a2b4bc05693912b8a55/libsokol.a(sokol_log.o at 11906)' 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-d/.zig-cache/o/10eb24f94f096a2b4bc05693912b8a55/libsokol.a(sokol_app.o at 20434)' 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-d/.zig-cache/o/10eb24f94f096a2b4bc05693912b8a55/libsokol.a(sokol_gfx.o at 95426)' 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-d/.zig-cache/o/10eb24f94f096a2b4bc05693912b8a55/libsokol.a(sokol_glue.o at 404594)' is 'wasm32-unknown-emscripten-musl' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten'

ldc2 + emcc (LTO enabled) no have different target triples.


Try use wasm32-unknown-emscripten-musl in zig cc + ldc2:

Output ```bash $ 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/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libGL-webgl2-getprocaddr.a(webgl1.o at 11978)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(abort.o at 378222)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(library_pthread_stub.o at 3029422)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(strcmp.o at 4909550)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(strncpy.o at 5010786)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(stpncpy.o at 4882322)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(strstr.o at 5043830)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(strchr.o at 4900882)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(strchrnul.o at 4904642)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc_optz.a(memcmp.o at 13440)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(memchr.o at 3341840)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(stdout.o at 4871994)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(__stdio_write.o at 296176)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(wasi-helpers.o at 5687994)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(vfprintf.o at 5501302)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(__stdio_exit.o at 276024)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(ofl.o at 3640468)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(strnlen.o at 5019042)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(wctomb.o at 5865574)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(wcrtomb.o at 5701986)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(pthread_self_stub.o at 3981382)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(getpid.o at 2253548)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libstubs.a(emscripten_syscall_stubs.o at 20812)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(libc.o at 3025610)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(frexp.o at 1976630)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libnoexit.a(atexit_dummy.o at 120)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(fmaf.o at 1797548)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(fenv.o at 1620942)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(fma.o at 1786992)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(fmal.o at 1801960)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(frexpl.o at 1984102)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(nextafterl.o at 3582564)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(scalbnl.o at 4493846)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(copysignl.o at 912316)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(fesetround.o at 1641758)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(ilogbl.o at 2674876)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(sigaddset.o at 4659826)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(sigaction.o at 4652894)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(ntohs.o at 3636708)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a(cxa_noexception.o at 1060872)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a(cxa_handlers.o at 1039400)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a(abort_message.o at 15752)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a(cxa_default_handlers.o at 28488)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a(private_typeinfo.o at 1117920)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a(stdlib_typeinfo.o at 1268472)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++-noexcept.a(new.o at 6837276)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++-noexcept.a(new_helpers.o at 6873032)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a(stdlib_exception.o at 1198864)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc++abi-noexcept.a(cxa_virtual.o at 1090936)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' wasm-ld: warning: Linking two modules of different target triples: '/home/kassane/.cache/zig/p/1220146d92ca77f3cabb151fd035f6fa2ea03481ea07f3358ec912f17acdba791a8a/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libc.a(htonl.o at 2403732)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-emscripten-musl' ```

Conflicts between zig cc and emcc different triple-targets!