EMSDK 3.1.14: no main argv with PROXY_TO_PTHREAD #17338
Closed
Description
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:
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("argc: %i\n", argc);
return 0;
}
$ 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: 0
$ emcc -pthread -sUSE_PTHREADS -sEXIT_RUNTIME main.c -o main.js
$ node --experimental-wasm-threads --experimental-wasm-bulk-memory main.js egg spam
argc: 3
Metadata
Assignees
Labels
No labels