summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/modules/HandleLLVMOptions.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
index 81f688dd01..b02182189e 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/cmake/modules/HandleLLVMOptions.cmake
@@ -30,6 +30,9 @@ if(NOT LLVM_FORCE_USE_OLD_TOOLCHAIN)
# libstdc++4.6 that is fixed in libstdc++4.7.
if(NOT LLVM_ENABLE_LIBCXX)
set(CMAKE_REQUIRED_FLAGS "-std=c++0x")
+ if (ANDROID)
+ set(CMAKE_REQUIRED_LIBRARIES "atomic")
+ endif()
check_cxx_source_compiles("
#include <atomic>
std::atomic<float> x(0.0f);