mirror of https://github.com/WebAssembly/wasi-sdk
main
toolchain_conly
threads-prerelease
sunfishcode/really-update-llvm
sunfishcode/llvm-13
cmake_module_path
sunfishcode/test-seekdir
remove_no_threads
run_tests
update_expected
lto
pch/compnerd_cmake_integration
pch/debian_dep
remove-hacks
wasi-sdk-34-rc.2
wasi-sdk-34-rc.1
wasi-sdk-33
wasi-sdk-32
wasi-sdk-31
wasi-sdk-30
wasi-sdk-29
wasi-sdk-28
wasi-sdk-27
wasi-sdk-26
wasi-sdk-25
wasi-sdk-24
wasi-sdk-23
wasi-sdk-22
wasi-sdk-21
wasi-sdk-20
wasi-sdk-20+threads
wasi-sdk-19
wasi-sdk-18
wasi-sdk-17
wasi-sdk-16
wasi-sdk-15
wasi-sdk-14
wasi-sdk-13
wasi-sdk-12
wasi-sdk-11
wasi-sdk-10
wasi-sdk-9
wasi-sdk-8
wasi-sdk-7
wasi-sdk-6
wasi-sdk-5
wasi-sdk-4
wasi-sdk-3
wasi-sdk-2
wasi-sdk-1
wasi-sdk-0
${ noResults }
2 Commits (wasi-sdk-33)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
003cf14969
|
Build a sysroot that supports C++ exceptions by default (#606)
This commit collects together some LLVM PRs, some changes in the build configuration here, and some thoughts from #565 and related issues. Specifically the changes here are: * The patch for llvm/llvm-project#168449 is updated to its upstream (unlanded) form. * Patches for the (landed) llvm/llvm-project#185770 and llvm/llvm-project#185775 are added. * The `WASI_SDK_EXCEPTIONS` configuration is now either `ON`, `OFF`, or `DUAL`. The default depends on the version of Clang in use, where 23.0.0+ (which isn't released officially yet) will be `DUAL` and otherwise it's `OFF`. CI for our custom-built patched toolchain defaults to `DUAL`. * In `DUAL` mode libcxx is built twice into two different directories, once with exceptions and once without. This is supported by LLVM patches and means that Clang will select the right set of libraries based on compiler flags. The end result here is that the produced toolchain from this repository, by default, supports C++ exceptions. Additionally if exceptions-related flags are not passed then the final binary will not use C++ exceptions nor require the wasm exception-handling proposal. There's still follow-up work from #565, such as: * Subjectively it feels wordy to pass `-fwasm-exceptions` vs `-fexceptions`. * Personally I think `-mllvm -wasm-use-legacy-eh=false` should become the default upstream. * Subjectively I don't think that `-lunwind` should be necessary and it should be injected automatically with `-fwasm-exceptions` (or `-fexceptions`). * Shared libraries for exceptions remain disabled due to build errors I do not personally know how to resolve. I'll file follow-up issues for these once this has landed since they're more minor compared to the main body of "anything works". Closes #334 Closes #565 --------- Co-authored-by: Joel Dice <joel.dice@akamai.com> |
4 months ago |
|
|
372ba0d222
|
Add experimental support for C++ exceptions (#590)
> **Note**: this PR is me weaving together the work of many others. For example @yerzham's and @cpetig's work on #565 pretty much shaped this PR. Thank you! This commit adds initial configuration support for building wasi-sdk with support for C++ exceptions in WebAssembly. A small test is included which is exercised in CI at this time, but otherwise this does not update CI to actually ship sdk builds with C++ exceptions enabled. Instead the intention here is to make it easier to test builds with support for C++ exceptions and centralize planning/development around this. The goal here is to get things compiling to the point that applications can be compiled. I haven't thoroughly tested C++ exceptions and as evident in this PR it still requires changes in LLVM. Some small logic is added here to apply a `*.patch` file to LLVM to avoid needing a new submodule fork or waiting for upstream changes. The intention is that this `*.patch` is short-lived once the changes are officially merged into LLVM itself. The `*.patch` included here contains llvm/llvm-project#168449 as well as another minor edit I found was necessary to get things compiling locally. Given the discussion on that PR it looks like once LLVM is updated with that merged the extra part of the `*.patch` won't be necessary. This PR notably does not enable shared libraries when exceptions are enabled. I don't know enough about how things are supposed to work to be able to fully diagnose the compilation errors I'm seeing if shared libraries are enabled. This is something I'd hope would be fixed before actually shipping exceptions support. This PR then additionally folds in [this gist][gist] for various bits of build logic to this repository itself. Finally, this PR includes some documentation about the current status of exceptions and links to various tracking issues too. [gist]: https://gist.github.com/yerzham/302efcec6a2e82c1e8de4aed576ea29d |
6 months ago |