Open juj opened 2 months ago
We can/should probably fix this. I believe its likely fallout from #21542
(edit: I see you already bisected to that PR)
Would it be nicer perhaps if you could just do #if MY_PREPROCESSING_DIRECTIVE
. I can't remember if there was a reason why -jsD
didn't just work like that?
I need it looks like we only test for #if MY_PREPROCESSING_DIRECTIVE
: https://github.com/emscripten-core/emscripten/blob/a94a40eb3116aebfdd92227ddff16260bd6aebe1/test/core/test_custom_js_settings.js#L3-L7
User reported a regression in my wasm_webgpu bindings when using newer Emscripten version: https://github.com/juj/wasm_webgpu/issues/44
There I had the following code pattern:
lib_a.js
(to be used with
emcc test/hello_world.c --js-library lib_a.js -jsDMY_PREPROCESSING_DIRECTIVE
occassionally)which after PR https://github.com/emscripten-core/emscripten/pull/21542 landed began to error out with:
It looks like I can fix this by changing the code to use
globalThis
instead ofglobal
:lib_a.js
and that fixes the impact of the regression in my codebase. However, that makes me think there is a relevant test case of functionality missing since this wasn't caught?