@@ -131,7 +131,7 @@ build/compiler-rt.BUILT: build/llvm.BUILT build/wasi-libc.BUILT
131
131
-DCOMPILER_RT_ENABLE_IOS=OFF \
132
132
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=On \
133
133
-DWASI_SDK_PREFIX=$(BUILD_PREFIX ) \
134
- -DCMAKE_C_FLAGS=" $( DEBUG_PREFIX_MAP) " \
134
+ -DCMAKE_C_FLAGS=" $( DEBUG_PREFIX_MAP) -fwasm-exceptions " \
135
135
-DLLVM_CONFIG_PATH=$(ROOT_DIR ) /build/llvm/bin/llvm-config \
136
136
-DCOMPILER_RT_OS_DIR=wasi \
137
137
-DCMAKE_INSTALL_PREFIX=$(PREFIX ) /lib/clang/$(CLANG_VERSION ) / \
@@ -162,13 +162,13 @@ LIBCXX_CMAKE_FLAGS = \
162
162
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
163
163
-DLIBCXX_ENABLE_SHARED:BOOL=OFF \
164
164
-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY:BOOL=OFF \
165
- -DLIBCXX_ENABLE_EXCEPTIONS:BOOL=OFF \
165
+ -DLIBCXX_ENABLE_EXCEPTIONS:BOOL=ON \
166
166
-DLIBCXX_ENABLE_FILESYSTEM:BOOL=OFF \
167
167
-DLIBCXX_CXX_ABI=libcxxabi \
168
168
-DLIBCXX_CXX_ABI_INCLUDE_PATHS=$(LLVM_PROJ_DIR ) /libcxxabi/include \
169
169
-DLIBCXX_HAS_MUSL_LIBC:BOOL=ON \
170
170
-DLIBCXX_ABI_VERSION=2 \
171
- -DLIBCXXABI_ENABLE_EXCEPTIONS:BOOL=OFF \
171
+ -DLIBCXXABI_ENABLE_EXCEPTIONS:BOOL=ON \
172
172
-DLIBCXXABI_ENABLE_SHARED:BOOL=OFF \
173
173
-DLIBCXXABI_SILENT_TERMINATE:BOOL=ON \
174
174
-DLIBCXXABI_ENABLE_THREADS:BOOL=OFF \
@@ -177,6 +177,10 @@ LIBCXX_CMAKE_FLAGS = \
177
177
-DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY:BOOL=OFF \
178
178
-DLIBCXXABI_HAS_WIN32_THREAD_API:BOOL=OFF \
179
179
-DLIBCXXABI_ENABLE_PIC:BOOL=OFF \
180
+ -DLIBUNWIND_ENABLE_ASSERTIONS:BOOL=OFF \
181
+ -DLIBUNWIND_ENABLE_SHARED:BOOL=OFF \
182
+ -DLIBUNWIND_ENABLE_THREADS:BOOL=OFF \
183
+ -DLIBUNWIND_USE_COMPILER_RT:BOOL=ON \
180
184
-DWASI_SDK_PREFIX=$(BUILD_PREFIX ) \
181
185
-DUNIX:BOOL=ON \
182
186
--debug-trycompile
@@ -186,11 +190,12 @@ build/libcxx.BUILT: build/llvm.BUILT build/compiler-rt.BUILT build/wasi-libc.BUI
186
190
mkdir -p build/libcxx
187
191
cd build/libcxx && cmake -G Ninja $(LIBCXX_CMAKE_FLAGS ) \
188
192
-DCMAKE_SYSROOT=$(BUILD_PREFIX ) /share/wasi-sysroot \
189
- -DCMAKE_C_FLAGS=" $( DEBUG_PREFIX_MAP) " \
190
- -DCMAKE_CXX_FLAGS=" $( DEBUG_PREFIX_MAP) " \
193
+ -DCMAKE_C_FLAGS=" $( DEBUG_PREFIX_MAP) -fwasm-exceptions " \
194
+ -DCMAKE_CXX_FLAGS=" $( DEBUG_PREFIX_MAP) -fwasm-exceptions " \
191
195
-DLIBCXX_LIBDIR_SUFFIX=$(ESCAPE_SLASH ) /wasm32-wasi \
192
196
-DLIBCXXABI_LIBDIR_SUFFIX=$(ESCAPE_SLASH ) /wasm32-wasi \
193
- -DLLVM_ENABLE_RUNTIMES=" libcxx;libcxxabi" \
197
+ -DLIBUNWIND_LIBDIR_SUFFIX=$(ESCAPE_SLASH ) /wasm32-wasi \
198
+ -DLLVM_ENABLE_RUNTIMES=" libcxx;libcxxabi;libunwind" \
194
199
$(LLVM_PROJ_DIR ) /runtimes
195
200
ninja $(NINJA_FLAGS ) -C build/libcxx
196
201
# Do the install.
0 commit comments