Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebAssembly: doesn't support emscripten data layout #4670

Closed
kassane opened this issue May 25, 2024 · 1 comment · Fixed by #4672
Closed

WebAssembly: doesn't support emscripten data layout #4670

kassane opened this issue May 25, 2024 · 1 comment · Fixed by #4672

Comments

@kassane
Copy link
Contributor

kassane commented May 25, 2024

LDC2 version: 1.38.0
EMCC version: 3.1.59

Based in my analysis kassane/sokol-d#3 (comment).

I've detected conflicts between targets involving only ldc2 + emcc with LTO enabled on both.

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(llrintl.o at 2994444)' is 'wasm32-unknown-emscripten' whereas 'ld-temp.o' is 'wasm32-unknown-unknown-wasm'
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(frexpf.o at 1903762)' 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'

emsc-libc:
e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20
ldc:
e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20

and ldc2 no have wasm32-unknown-emscripten triple-target.

@JohanEngelen
Copy link
Member

The warning is fixed by #4672

The data layout that I get with LDC master and LLVM15, 17, and 18 is the same as emsc-libc:
e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants