diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 81f688dd017..b02182189e0 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 std::atomic x(0.0f);