Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jan 13, 2026

Reverts #125412

See the discussion in #125412 for why this is necessary. The summary is that:

  • Eliding arguments is the C23 extension, but libunwind builds its C files with -std=c99, so this change broke the build.
  • -Wno-unused-parameter is part of the build for libunwind, so the codebase does allow them.

@sbc100 sbc100 requested a review from a team as a code owner January 13, 2026 15:13
@llvmbot
Copy link
Member

llvmbot commented Jan 13, 2026

@llvm/pr-subscribers-libunwind

Author: Sam Clegg (sbc100)

Changes

Reverts llvm/llvm-project#125412

See the discussion in #125412 for why this is necessary. The summary is that:

  • Eliding arguments is the C23 extension
  • -Wno-unused-parameter is part of the build for libunwind, so the codebase does allow them.

Full diff: https://github.com/llvm/llvm-project/pull/175776.diff

1 Files Affected:

  • (modified) libunwind/src/Unwind-wasm.c (+4-2)
diff --git a/libunwind/src/Unwind-wasm.c b/libunwind/src/Unwind-wasm.c
index b0d6cd2d00fc5..2f4498c3f3989 100644
--- a/libunwind/src/Unwind-wasm.c
+++ b/libunwind/src/Unwind-wasm.c
@@ -102,7 +102,8 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetIP(struct _Unwind_Context *context) {
 }
 
 /// Not used in Wasm.
-_LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t) {}
+_LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context,
+                                     uintptr_t value) {}
 
 /// Called by personality handler to get LSDA for current frame.
 _LIBUNWIND_EXPORT uintptr_t
@@ -114,7 +115,8 @@ _Unwind_GetLanguageSpecificData(struct _Unwind_Context *context) {
 }
 
 /// Not used in Wasm.
-_LIBUNWIND_EXPORT uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *) {
+_LIBUNWIND_EXPORT uintptr_t
+_Unwind_GetRegionStart(struct _Unwind_Context *context) {
   return 0;
 }
 

Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

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

Looks good, if idionne is happy.

Eliding arguments is the C23 extension, but libunwind builds its C files with -std=c99, so this change broke the build.

Does it break the build with very new clang? If yes, please include the information.

While I've read comments on #125412, it isn't clear to me why the change, merged on on Feb 17, 2025, was noticed only recently.

@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 14, 2026

Looks good, if idionne is happy.

Eliding arguments is the C23 extension, but libunwind builds its C files with -std=c99, so this change broke the build.

Does it break the build with very new clang? If yes, please include the information.

While I've read comments on #125412, it isn't clear to me why the change, merged on on Feb 17, 2025, was noticed only recently.

Because in emscripten (which is one of the primary consumers of the WebAssembly build of libunwind) only updates these libraries (libunwind/libcxx/etc) ever major release, and we noticed when trying to update to LLVM 21 in emscripten-core/emscripten#26036.

As far as I know there is no CI action that build these libraries for WebAssembly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants