Review comments

pull/606/head
Alex Crichton 6 months ago
parent 2f7a86ed94
commit a7ca86ddb1

@ -172,10 +172,10 @@ jobs:
- run: cargo install wasm-component-ld@0.5.21
- name: Install LLVM 22
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
v=22
rel=$(lsb_release -cs)
sudo apt-add-repository "deb http://apt.llvm.org/$rel/ llvm-toolchain-$rel-$v main"
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/keyrings/llvm.asc
echo "deb [signed-by=/etc/apt/keyrings/llvm.asc] http://apt.llvm.org/$rel/ llvm-toolchain-$rel-$v main" | sudo tee /etc/apt/sources.list.d/llvm-$v.list
sudo apt-get update -y && sudo apt-get install -y clang-$v lld-$v
- run: |
cmake -G Ninja -B build -S . \

@ -3,7 +3,7 @@
> **Note**: this documentation does not cover wasi-sdk-31, the latest version
> of wasi-sdk at this time.
From wasi-sdk-32 and onwards the artifacts produced by this repository support
From wasi-sdk-33 and onwards the artifacts produced by this repository support
compiling C++ code both with and without exceptions. The sysroot for wasm
targets contains two copies of the C++ standard library and headers -- one with
exceptions enabled and one with exceptions disabled. These are automatically
@ -62,9 +62,9 @@ wasi-sdk at this time:
issues in this repository itself as well as [resolving some upstream
issues](https://github.com/llvm/llvm-project/issues/188077).
* Currently `-fwasm-exceptions` is a required flag to enable C++ exceptions.
It's unclear whethe `-fexceptions` should also be supported as a substitute.
It's unclear whether `-fexceptions` should also be supported as a substitute.
* Currently LLVM defaults to using the legacy exception-handling proposal and
this will likely change in the future. Precompiled libraries for wasi-sdk are
all built with the standard exception-handlign proposal.
all built with the standard exception-handling proposal.
* Currently `-lunwind` is required when linking, but this may become automatic
in the future.

@ -377,6 +377,12 @@ endfunction()
function(define_libcxx target)
add_custom_target(libcxx-${target})
# For dual-mode exceptions-and-not there are two versions of libcxx which are
# compiled and placed into the sysroot. They're named slightly differently to
# have unique CMake rules.
#
# Otherwise there's only one build of libcxx and it's either got exceptions for
# it doesn't depending on configuration.
if (WASI_SDK_EXCEPTIONS STREQUAL "DUAL")
define_libcxx_and_lto(${target} "" OFF)
define_libcxx_and_lto(${target} "-exn" ON)

Loading…
Cancel
Save