Skip to content

Commit 9fbc7b5

Browse files
authored
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 <[email protected]>
1 parent f185846 commit 9fbc7b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ LIBCXX_CMAKE_FLAGS = \
182182
-DLIBCXX_ENABLE_SHARED:BOOL=$(2) \
183183
-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY:BOOL=OFF \
184184
-DLIBCXX_ENABLE_EXCEPTIONS:BOOL=OFF \
185-
-DLIBCXX_ENABLE_FILESYSTEM:BOOL=OFF \
185+
-DLIBCXX_ENABLE_FILESYSTEM:BOOL=ON \
186186
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT:BOOL=OFF \
187187
-DLIBCXX_CXX_ABI=libcxxabi \
188188
-DLIBCXX_CXX_ABI_INCLUDE_PATHS=$(LLVM_PROJ_DIR)/libcxxabi/include \

0 commit comments

Comments
 (0)