Skip to content
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

Fix crash on missing linker flags #23461

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jan 21, 2025

Without this change running emcc test/hello_world.c -Xlinker will crash with:

...
  File "emcc.py", line 813, in phase_setup
    state.add_link_flag(i + 1, newargs[i + 1])
                               ~~~~~~~^^^^^^^
IndexError: list index out of range

@sbc100 sbc100 requested review from dschuff and brendandahl January 21, 2025 17:28
@sbc100 sbc100 force-pushed the linker_flag_missing branch from 76ff21f to d41ec98 Compare January 21, 2025 17:30
@@ -50,7 +50,7 @@ lint.ignore = [
"PLW2901",
]
lint.per-file-ignores."emrun.py" = [ "PLE0704" ]
lint.mccabe.max-complexity = 49 # Recommended: 10
lint.mccabe.max-complexity = 51 # Recommended: 10
Copy link
Member

Choose a reason for hiding this comment

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

😂😅

@sbc100 sbc100 merged commit 797fcd9 into emscripten-core:main Jan 21, 2025
29 checks passed
@sbc100 sbc100 deleted the linker_flag_missing branch January 21, 2025 20:59
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.

2 participants