aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/FindLibcCommonUtils.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/FindLibcCommonUtils.cmake')
-rw-r--r--cmake/Modules/FindLibcCommonUtils.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/Modules/FindLibcCommonUtils.cmake b/cmake/Modules/FindLibcCommonUtils.cmake
index 95426c5..81cf74f 100644
--- a/cmake/Modules/FindLibcCommonUtils.cmake
+++ b/cmake/Modules/FindLibcCommonUtils.cmake
@@ -12,6 +12,9 @@ if(NOT TARGET llvm-libc-common-utilities)
add_library(llvm-libc-common-utilities INTERFACE)
# TODO: Reorganize the libc shared section so that it can be included without
# adding the root "libc" directory to the include path.
+ if (NOT(LIBCXX_ENABLE_THREADS))
+ target_compile_definitions(llvm-libc-common-utilities INTERFACE LIBC_THREAD_MODE=LIBC_THREAD_MODE_SINGLE)
+ endif()
target_include_directories(llvm-libc-common-utilities INTERFACE ${libc_path})
target_compile_definitions(llvm-libc-common-utilities INTERFACE LIBC_NAMESPACE=__llvm_libc_common_utils)
target_compile_features(llvm-libc-common-utilities INTERFACE cxx_std_17)