Added initial support for emscripten clang compilers#70
Added initial support for emscripten clang compilers#70novicearts wants to merge 2 commits intographitemaster:mainfrom
Conversation
Signed-off-by: Novice Arts LLC <noviceartsstudios@gmail.com>
|
Not sure this is the correct approach. It seems that the Also |
|
I agree with your suggestion about the It seems like the big change is the section label, as that had new syntax I have not seen in any other assembler. As well, emscripten requires incbin to be restricted to the I can fix |
|
so I double checked your suggestion about the |
Signed-off-by: Novice Arts LLC <noviceartsstudios@gmail.com>
|
I'm working on a project that would potentially benefit from "incbin" WASM support. Any chance of getting WASM support merged in the near future? |
… as of 2025-10-23. Add associated test code to verify WASM compatibility.
…ing on top of main as of 2025-10-23

This PR includes necessary changes to get the incbin header file working on emscripten platforms.
The changes made here are based on the following code snippet: https://github.com/dotnet/runtimelab/blob/889ad1337ac28740a97cc60fa6126654e59de73c/src/native/libs/System.Globalization.Native/icu_data_lib.c#L8-L18
I learned about this from discussing with folks on the WebAssembly discord server. Presently the
.sizemarker holds a fixed size amount of4in the common macro, which may pose a problem for wasm64, but I believe should be fine for wasm32. Otherwise from tests on my machine I've experienced near identical behavior switching from PC to web targets of my code.I tested this on a windows 8 machine using clang for both PC and Web. I dont have access to other machines/OSes to test the changes with. In the worst case scenario this cant be merged, I hope it serves as a useful reference for anyone else wanting to integrate with emscripten.