Skip to content

Commit 3a8c1bd

Browse files
kateinoigakukunAnka
authored and
Anka
committed
wasm: Enable filesystem APIs in libcxx
As of a recent fix included in LLVM 17[1] and wasi-libc fix[2], we can enable `LIBCXX_ENABLE_FILESYSTEM` in libcxx build for WebAssembly/WASI. This allows us to use `<filesystem>`, `<fstream>`, etc in C++ code. [1]: llvm/llvm-project@66a562d [2]: WebAssembly/wasi-libc#463
1 parent d3064c5 commit 3a8c1bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/swift_build_support/swift_build_support/products/wasisysroot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def _build(self, host_target, enable_wasi_threads=False,
203203
self.cmake_options.define('LIBCXX_ENABLE_SHARED:BOOL', 'FALSE')
204204
self.cmake_options.define('LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY:BOOL', 'FALSE')
205205
self.cmake_options.define('LIBCXX_ENABLE_EXCEPTIONS:BOOL', 'FALSE')
206-
self.cmake_options.define('LIBCXX_ENABLE_FILESYSTEM:BOOL', 'FALSE')
206+
self.cmake_options.define('LIBCXX_ENABLE_FILESYSTEM:BOOL', 'TRUE')
207207
self.cmake_options.define('LIBCXX_CXX_ABI', 'libcxxabi')
208208
self.cmake_options.define('LIBCXX_HAS_MUSL_LIBC:BOOL', 'TRUE')
209209

0 commit comments

Comments
 (0)