update wasi-libc and Makefile to fix `<fstream>` (#375)

As of LLVM 17, which includes https://reviews.llvm.org/D152168, libcxx has
combined the old `_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY` and
`_LIBCPP_HAS_NO_FSTREAM` preprocessor symbols into a single
`_LIBCPP_HAS_NO_FILESYSTEM` symbol, which means there's no longer any way to
enable `<fstream>` without enabling `<filesystem>`.

The solution is to set `-DLIBCXX_ENABLE_FILESYSTEM:BOOL=ON` and update
`wasi-libc`, which includes stubs for the functions required by libcxx's
`<filesystem>` implementation.

Fixes #373

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
pull/384/head
Joel Dice 1 year ago committed by GitHub
parent f1858468e2
commit 9fbc7b5972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -182,7 +182,7 @@ LIBCXX_CMAKE_FLAGS = \
-DLIBCXX_ENABLE_SHARED:BOOL=$(2) \
-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY:BOOL=OFF \
-DLIBCXX_ENABLE_EXCEPTIONS:BOOL=OFF \
-DLIBCXX_ENABLE_FILESYSTEM:BOOL=OFF \
-DLIBCXX_ENABLE_FILESYSTEM:BOOL=ON \
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT:BOOL=OFF \
-DLIBCXX_CXX_ABI=libcxxabi \
-DLIBCXX_CXX_ABI_INCLUDE_PATHS=$(LLVM_PROJ_DIR)/libcxxabi/include \

@ -1 +1 @@
Subproject commit 925ad6d75899397d26b9f09a6f195dbf5eb35814
Subproject commit cc62fa82c29bfced82d280cbccc231667ee80822
Loading…
Cancel
Save