-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
EMSDK 3.1.14: no main argv with PROXY_TO_PTHREAD #17338
Comments
WIth # emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.13 (531257621816c200bc7c3be53129494afd029aec)
clang version 15.0.0 (https://github.com/llvm/llvm-project 5c6ed60c517c47b25b6b25d8ac3666d0e746b0c3)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /emsdk/upstream/bin
# emcc -pthread -sUSE_PTHREADS -sPROXY_TO_PTHREAD -sEXIT_RUNTIME main.c -o main.js
# node --experimental-wasm-threads --experimental-wasm-bulk-memory main.js egg spam
argc: 3 |
In 3.1.14 the
3.1.13 had this block:
If I patch the block into my JS file, then argument passing works again. |
I suspect that the issue might be related to |
Bisected to
So I assume #17153 is the cause. cc @sbc100 Also, surprising we don't have a test for this... |
EMSDK 3.1.14 no longer passes any argc / argv to the program with linker flag
-sPROXY_TO_PTHREAD
. This used to work fine with 3.1.13 and earlier versions of Emscripten. It is trival to reproduce with a C program that prints argc.Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.14 (4343cbe)
clang version 15.0.0 (https://github.com/llvm/llvm-project 7effcbda49ba32991b8955821b8fdbd4f8f303e2)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /opt/emsdk/upstream/bin
Failing command line in full:
The text was updated successfully, but these errors were encountered: