Skip to content

Commit 99fc4a6

Browse files
committed
[libcxx] Enable filesystem by default for mingw targets
This feature can be built successfully for windows now. However, the helper functions for __int128_t aren't available in MSVC configurations, so don't enable it by default there yet. (See https://reviews.llvm.org/D91139 for discussion on how to proceed with things in MSVC environments.) Differential Revision: https://reviews.llvm.org/D97075
1 parent b13e942 commit 99fc4a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libcxx/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
9090
option(LIBCXX_ENABLE_STATIC "Build libc++ as a static library." ON)
9191
option(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY "Build libc++experimental.a" ON)
9292
set(ENABLE_FILESYSTEM_DEFAULT ON)
93-
if (WIN32)
93+
if (WIN32 AND NOT MINGW)
94+
# Filesystem is buildable for windows, but it requires __int128 helper
95+
# functions, that currently are provided by libgcc or compiler_rt builtins.
96+
# These are available in MinGW environments, but not currently in MSVC
97+
# environments.
9498
set(ENABLE_FILESYSTEM_DEFAULT OFF)
9599
endif()
96100
option(LIBCXX_ENABLE_FILESYSTEM "Build filesystem as part of the main libc++ library"

0 commit comments

Comments
 (0)