Index: cmake/config-ix.cmake =================================================================== --- cmake/config-ix.cmake +++ cmake/config-ix.cmake @@ -168,7 +168,12 @@ endif() # Generate the COMPILER_RT_SUPPORTED_ARCH list. -if(ANDROID) +if(NOT COMPILER_RT_BUILD_SANITIZERS AND CMAKE_C_COMPILER_FORCED) + # If the compiler has been forced and we build only the builtins library + # assume that the arch is supported. + set(CAN_TARGET_${COMPILER_RT_DEFAULT_TARGET_ARCH} 1) + list(APPEND COMPILER_RT_SUPPORTED_ARCH ${COMPILER_RT_DEFAULT_TARGET_ARCH}) +elseif(ANDROID) # Examine compiler output to determine target architecture. detect_target_arch() set(COMPILER_RT_OS_SUFFIX "-android")