Index: runtimes/CMakeLists.txt =================================================================== --- runtimes/CMakeLists.txt +++ runtimes/CMakeLists.txt @@ -85,7 +85,6 @@ # Handle common options used by all runtimes. include(AddLLVM) - include(HandleLLVMOptions) set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS}) set(CMAKE_REQUIRED_LIBRARIES ${SAFE_CMAKE_REQUIRED_LIBRARIES}) @@ -216,6 +215,8 @@ -DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR} -DCMAKE_C_COMPILER_TARGET=${TARGET_TRIPLE} -DCMAKE_ASM_COMPILER_TARGET=${TARGET_TRIPLE} + -DCMAKE_C_COMPILER_WORKS=ON + -DCMAKE_ASM_COMPILER_WORKS=ON PASSTHROUGH_PREFIXES COMPILER_RT USE_TOOLCHAIN ${EXTRA_ARGS}) @@ -244,9 +245,9 @@ -DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR} -DCMAKE_C_COMPILER_TARGET=${target} -DCMAKE_ASM_COMPILER_TARGET=${target} - -DCMAKE_C_COMPILER_WORKS=On - -DCMAKE_ASM_COMPILER_WORKS=On - -DCOMPILER_RT_DEFAULT_TARGET_ONLY=On + -DCMAKE_C_COMPILER_WORKS=ON + -DCMAKE_ASM_COMPILER_WORKS=ON + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON ${${target}_extra_args} TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib PASSTHROUGH_PREFIXES COMPILER_RT @@ -324,6 +325,9 @@ CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR} + -DCMAKE_C_COMPILER_WORKS=ON + -DCMAKE_CXX_COMPILER_WORKS=ON + -DCMAKE_ASM_COMPILER_WORKS=ON PASSTHROUGH_PREFIXES ${prefixes} EXTRA_TARGETS ${extra_targets} ${test_targets}