diff options
| author | Eric Fiselier <eric@efcs.ca> | 2019-03-21 00:04:31 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2019-03-21 00:04:31 +0000 |
| commit | f1d87f8b4c430d72e7ab07e13508336a7841c3e6 (patch) | |
| tree | 7c8a8cc30ee3f7518c734cf8204dd57fad8934bf /libcxx/lib | |
| parent | 49fc2655819fef5b733ee5fda5c10b434150ebf5 (diff) | |
| download | bcm5719-llvm-f1d87f8b4c430d72e7ab07e13508336a7841c3e6.tar.gz bcm5719-llvm-f1d87f8b4c430d72e7ab07e13508336a7841c3e6.zip | |
Allow disabling of filesystem library.
Summary: Filesystem doesn't work on Windows, so we need a mechanism to turn it off for the time being.
Reviewers: ldionne, serge-sans-paille, EricWF
Reviewed By: EricWF
Subscribers: mstorsjo, mgorny, christof, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59619
llvm-svn: 356633
Diffstat (limited to 'libcxx/lib')
| -rw-r--r-- | libcxx/lib/CMakeLists.txt | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt index e73e459e3fd..701f66e4637 100644 --- a/libcxx/lib/CMakeLists.txt +++ b/libcxx/lib/CMakeLists.txt @@ -3,8 +3,6 @@ set(LIBCXX_LIB_CMAKEFILES_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTOR # Get sources # FIXME: Don't use glob here file(GLOB LIBCXX_SOURCES ../src/*.cpp) -list(APPEND LIBCXX_SOURCES ../src/filesystem/operations.cpp - ../src/filesystem/directory_iterator.cpp) if(WIN32) file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp) list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES}) @@ -13,12 +11,16 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS") list(APPEND LIBCXX_SOURCES ${LIBCXX_SOLARIS_SOURCES}) endif() -# Filesystem uses __int128_t, which requires a definition of __muloi4 when -# compiled with UBSAN. This definition is not provided by libgcc_s, but is -# provided by compiler-rt. So we need to disable it to avoid having multiple -# definitions. See filesystem/int128_builtins.cpp. -if (NOT LIBCXX_USE_COMPILER_RT) - list(APPEND LIBCXX_SOURCES ../src/filesystem/int128_builtins.cpp) +if (LIBCXX_ENABLE_FILESYSTEM) + list(APPEND LIBCXX_SOURCES ../src/filesystem/operations.cpp + ../src/filesystem/directory_iterator.cpp) + # Filesystem uses __int128_t, which requires a definition of __muloi4 when + # compiled with UBSAN. This definition is not provided by libgcc_s, but is + # provided by compiler-rt. So we need to disable it to avoid having multiple + # definitions. See filesystem/int128_builtins.cpp. + if (NOT LIBCXX_USE_COMPILER_RT) + list(APPEND LIBCXX_SOURCES ../src/filesystem/int128_builtins.cpp) + endif() endif() # Add all the headers to the project for IDEs. |

