Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jun 5, 2025

In order to make this work I extracted the command line handling
code into tools/cmdline.py. This should also help for creating emld,
the standalone linker.

Without this change the test fails with:

Error while scanning dependencies for /usr/local/google/home/sbc/dev/wasm/emscripten/test/cmake/cxx20/main.cpp:
error: unknown argument: '-sUSE_SDL'

The code in the new cmdline.py file is just ~600 lines that was previously
in emcc.py, completely unmodified.

Fixes: #24454, #24410

In order to make this work I extracted the command line handling
code into tools/cmdline.py.   This should also help for creating emld,
the standalone linker.

Without this change the test fails with:

```
Error while scanning dependencies for /usr/local/google/home/sbc/dev/wasm/emscripten/test/cmake/cxx20/main.cpp:
error: unknown argument: '-sUSE_SDL'
```

Fixes: emscripten-core#24454, emscripten-core#24410
@sbc100 sbc100 requested review from dschuff and kripken June 5, 2025 23:22
@sbc100 sbc100 enabled auto-merge (squash) June 6, 2025 17:46
Copy link
Member

@dschuff dschuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refactoring looks good. It's a bummer that we have these -s args at compile time though. I assume port-related ones like -sUSE_SDL could eventually be transitioned to -i flags or something. Are there others that are really intractable?

@sbc100 sbc100 merged commit b8a607e into emscripten-core:main Jun 6, 2025
30 checks passed
@sbc100 sbc100 deleted the emscandeps branch June 6, 2025 18:03
Lukasdoe pushed a commit to Lukasdoe/emscripten that referenced this pull request Jun 19, 2025
In order to make this work I extracted the command line handling
code into tools/cmdline.py.   This should also help for creating emld,
the standalone linker.

Without this change the test fails with:

```
Error while scanning dependencies for /usr/local/google/home/sbc/dev/wasm/emscripten/test/cmake/cxx20/main.cpp:
error: unknown argument: '-sUSE_SDL'
```

The code in the new cmdline.py file is just ~600 lines that was
previously
in emcc.py, completely unmodified.

Fixes: emscripten-core#24454, emscripten-core#24410
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 this pull request may close these issues.

emscan-deps doesn't recognize -s arguments

2 participants