-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Update libunwind from LLVM 20.1.8 to 21.1.8 #26036
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
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.
|
Does upstream build with std=c23? |
|
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?
|
Can we land this as is then? |
sbc100
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment here to remove once llvm/llvm-project#175776 lands?`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: 3e90af6
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: