Update libunwind from LLVM 20.1.8 to 21.1.8#26036
Merged
aheejin merged 7 commits intoemscripten-core:mainfrom Jan 13, 2026
Merged
Update libunwind from LLVM 20.1.8 to 21.1.8#26036aheejin merged 7 commits intoemscripten-core:mainfrom
aheejin merged 7 commits intoemscripten-core:mainfrom
Conversation
llvm/llvm-project#125412 removed parameter names to suppress `-Wunused-parameter` in their own build system. As a result now we have this error: ```console ../../../system/lib/libunwind/src/Unwind-wasm.c:105:62: error: omitting the parameter name in a function definition is a C23 extension [-Werror,-Wc23-extensions] 105 | _LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t) {} | ``` We have three ways to fix it? 1. Re-add parameter names. But this will later clash with llvm/llvm-project#125412. 2. Add `-std=c23` to the cflags. But this only applies to .c files and our `get_cflags` function in `system_libs.py` doesn't take a file name so we can't apply different cflags depending on the file extensions. While it's possible to add the filename paramater to `get_cflags`, it is a bigger refactoring. 3. Suppress the warning using `-Wno-c23-extension`. This does 3, which is the quickest. But eventually we may need to change what llvm/llvm-project#125412 did.
Collaborator
|
Does upstream build with std=c23? |
Member
Author
|
It does, but libunwind has both .c and .cpp files so we can't unilaterally build them with |
How can I get both of them wrong?
Member
Author
|
Can we land this as is then? |
sbc100
approved these changes
Jan 13, 2026
Collaborator
sbc100
left a comment
There was a problem hiding this comment.
lgtm, sorry I didn't understand the c23 warning things initially!
|
|
||
| cflags = ['-Oz', '-fno-inline-functions', '-D_LIBUNWIND_HIDE_SYMBOLS'] | ||
| cflags = ['-Oz', '-fno-inline-functions', '-D_LIBUNWIND_HIDE_SYMBOLS', | ||
| '-Wno-c23-extensions'] |
Collaborator
There was a problem hiding this comment.
Can you add a comment here to remove once llvm/llvm-project#175776 lands?`
inolen
pushed a commit
to inolen/emscripten
that referenced
this pull request
Feb 13, 2026
This updates libunwind from 20.1.8 to LLVM 21.1.8: https://github.com/llvm/llvm-project/releases/tag/llvmorg-21.1.8 Additional change: - Add `-Wno-c23-extensions` to libunwind's cflags: emscripten-core@0070206 llvm/llvm-project#125412 removed parameter names to suppress `-Wunused-parameter` in their own build system, but this causes these errors instead for us: ```console ../../../system/lib/libunwind/src/Unwind-wasm.c:105:62: error: omitting the parameter name in a function definition is a C23 extension [-Werror,-Wc23-extensions] 105 | _LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t) {} | ``` This suppresses the warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates libunwind from 20.1.8 to LLVM 21.1.8:
https://github.com/llvm/llvm-project/releases/tag/llvmorg-21.1.8
Additional change:
-Wno-c23-extensionsto libunwind's cflags: 0070206Silence -Wunused-parameter warnings in Unwind-wasm.c llvm/llvm-project#125412 removed parameter names to suppress
-Wunused-parameterin their own build system, but this causes these errors instead for us: