From 964191c91aac5ee0f96bb127371ed88ce1bef814 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Wed, 10 Jan 2024 10:35:01 -0700 Subject: [PATCH] update wasi-libc and Makefile to fix `` 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 `` without enabling ``. The solution is to set `-DLIBCXX_ENABLE_FILESYSTEM:BOOL=ON` and update `wasi-libc`, which includes stubs for the functions required by libcxx's `` implementation. Fixes #373 Signed-off-by: Joel Dice --- Makefile | 2 +- src/wasi-libc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 76d428141..4d26fd1c8 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/src/wasi-libc b/src/wasi-libc index 925ad6d75..cc62fa82c 160000 --- a/src/wasi-libc +++ b/src/wasi-libc @@ -1 +1 @@ -Subproject commit 925ad6d75899397d26b9f09a6f195dbf5eb35814 +Subproject commit cc62fa82c29bfced82d280cbccc231667ee80822