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

Exclude setjmp runtime from LTO #529

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Exclude setjmp runtime from LTO #529

merged 1 commit into from
Aug 27, 2024

Conversation

yamt
Copy link
Contributor

@yamt yamt commented Aug 23, 2024

This fixes errors like:

wasm-ld: error: /Volumes/PortableSSD/git/wasi-sdk/build/install/bin/../share/wasi-sysroot/lib/wasm32-wasi/llvm-lto/19.1.0-wasi-sdk/libsetjmp.a(rt.o): attempt to add bitcode file after LTO (__wasm_longjmp)

Note: Any symbol that the compiler might generate at bitcode compile time either need to be unconditionally included at LTO time, or not built as LTO. This is because LTO object files cannot be added to the link after LTO time.

This fixes errors like:
```
wasm-ld: error: /Volumes/PortableSSD/git/wasi-sdk/build/install/bin/../share/wasi-sysroot/lib/wasm32-wasi/llvm-lto/19.1.0-wasi-sdk/libsetjmp.a(rt.o): attempt to add bitcode file after LTO (__wasm_longjmp)
```
Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

We might want to explain in the PR description why this is needed.

Something along the lines of "Any symbol that the compiler might generate at bitcode compile time either need to be unconditionally included at LTO time, or not built as LTO. This is because LTO object files cannot be added to the link after LTO time".

@yamt
Copy link
Contributor Author

yamt commented Aug 24, 2024

We might want to explain in the PR description why this is needed.

Something along the lines of "Any symbol that the compiler might generate at bitcode compile time either need to be unconditionally included at LTO time, or not built as LTO. This is because LTO object files cannot be added to the link after LTO time".

i copy and pasted your description. thank you.

@abrown abrown merged commit 8279f95 into WebAssembly:main Aug 27, 2024
8 checks passed
yamt added a commit to yamt/wasi-sdk that referenced this pull request Aug 28, 2024
yamt added a commit to yamt/wasi-sdk that referenced this pull request Sep 18, 2024
alexcrichton pushed a commit to WebAssembly/wasi-sdk that referenced this pull request Sep 24, 2024
* llvmorg-19.1.0-rc3

* document setjmp/longjmp support

* README.md: mention SetjmpLongjmp.md

* bump wasi-libc

For following changes:

* WebAssembly/wasi-libc#526
* WebAssembly/wasi-libc#529

* bump llvm to llvmorg-19.1.0-rc4

* bump llvm to llvmorg-19.1.0
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.

3 participants