[CMake] [Darwin] Log architecture test failures to CMakeError.log
authorChris Bieneman <beanz@apple.com>
Thu, 10 Dec 2015 00:39:57 +0000 (00:39 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 10 Dec 2015 00:39:57 +0000 (00:39 +0000)
This makes debugging configuration issues way easier.

llvm-svn: 255183

compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake

index b304df2..511361b 100644 (file)
@@ -78,6 +78,10 @@ function(darwin_test_archs os valid_archs)
                 OUTPUT_VARIABLE TEST_OUTPUT)
     if(${CAN_TARGET_${os}_${arch}})
       list(APPEND working_archs ${arch})
+    else()
+      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+        "Testing compiler for supporting ${os}-${arch}:\n"
+        "${TEST_OUTPUT}\n")
     endif()
   endforeach()
   set(${valid_archs} ${working_archs}