[libc-commits] [PATCH] D95118: [CMake][libc] Distinguish compiler and run failures

Petr Hosek via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jan 21 15:27:53 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGb0143352634b: [libc] Distinguish compiler and run failures (authored by phosek).
Herald added a project: libc-project.
Herald added a subscriber: libc-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95118/new/

https://reviews.llvm.org/D95118

Files:
  libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake


Index: libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
+++ libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
@@ -115,12 +115,14 @@
     COMPILE_DEFINITIONS ${flags}
     COMPILE_OUTPUT_VARIABLE compile_output
     RUN_OUTPUT_VARIABLE run_output)
-  if(${compile_result} AND ("${run_result}" EQUAL 0))
+  if("${run_result}" EQUAL 0)
     set(${output_var}
         "${run_output}"
         PARENT_SCOPE)
+  elseif(NOT ${compile_result})
+    message(FATAL_ERROR "Failed to compile: ${compile_output}")
   else()
-    message(FATAL_ERROR "${compile_output}")
+    message(FATAL_ERROR "Failed to run: ${run_output}")
   endif()
 endfunction()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95118.318330.patch
Type: text/x-patch
Size: 766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210121/f410c50f/attachment.bin>


More information about the libc-commits mailing list