Skip to content

[EH] Apply Call EH personality fix from LLVM - #27445

Open
aheejin wants to merge 1 commit into
emscripten-core:mainfrom
aheejin:fix_eh_personality
Open

[EH] Apply Call EH personality fix from LLVM#27445
aheejin wants to merge 1 commit into
emscripten-core:mainfrom
aheejin:fix_eh_personality

Conversation

@aheejin

@aheejin aheejin commented Jul 30, 2026

Copy link
Copy Markdown
Member

After llvm/llvm-project#209282, the user code calls a personality function instead of Unwind_CallPersonality. It also changed the signature of Wasm personality function. It had both code generation and library changes, but now our waterfall picks up the codegen changes but our libraries are still from the last release.

This applies llvm/llvm-project#209282 library side patch here as well. This kind of change is rare enough so I don't think we necessary should follow LLVM tot for libunwind, unless we decide to do that broadly for all LLVM libraries.

Also this adds system/lib/libunwind/include to libcxx's includes directory. Turns out so far we have been including Clang's default unwind.h and it was OK but now we need to include the correct file.

Fixes #27442.

After llvm/llvm-project#209282, the user code
calls a personality function instead of `Unwind_CallPersonality`. It
also changed the signature of Wasm personality function. It had both
code generation and library changes, but now our waterfall picks up the
codegen changes but our libraries are still from the last release.

This applies llvm/llvm-project#209282 library
side patch here as well. This kind of change is rare enough so I don't
think we necessary should follow LLVM tot for libunwind, unless we
decide to do that broadly for all LLVM libraries.

Also this adds `system/lib/libunwind/include` to libcxx's `includes`
directory. Turns out so far we have been including Clang's default
`unwind.h` and it was OK but now we need to include the correct file.

Fixes emscripten-core#27442.
@aheejin
aheejin requested a review from sbc100 July 30, 2026 01:03

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this!

@sbc100

sbc100 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What is wrong with Clang's default unwind.h BTW?

@aheejin

aheejin commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

What is wrong with Clang's default unwind.h BTW?

That is https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/unwind.h and it looks it mostly declares the same set of functions and constants. I guess clang provides it as a common set of interface? I don't know. TIL I learned clang has it. The upstream LLVM seems to control this in CMakeLists.txt.

@aheejin

aheejin commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

By the way the CI here can't succeed because the LLVM roll didn't roll. How do we resolve this?

@sbc100

sbc100 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

By the way the CI here can't succeed because the LLVM roll didn't roll. How do we resolve this?

Is there some way to make a version of libunwind that can work with both old (before the roll) and new (after the roll) version of llvm?

If not then we have to do something sad like temporarily disable some tests while the roll happens I think?

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.

LLVM roller failing with undefined symbol: __gxx_wasm_personality_v0

2 participants