[PATCH] D58086: [CMake][XRay] Silence llvm-config error when checking library support

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 11 16:15:18 PST 2019


phosek created this revision.
phosek added reviewers: dberris, smeenai.
Herald added subscribers: llvm-commits, Sanitizers, mgorny.
Herald added projects: LLVM, Sanitizers.

Otherwise this propagates all the way to CMake and results in an error
during configuration. We check and handle the result and report warning
separately so this is not changing the behavior.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D58086

Files:
  compiler-rt/cmake/Modules/CompilerRTUtils.cmake


Index: compiler-rt/cmake/Modules/CompilerRTUtils.cmake
===================================================================
--- compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -233,7 +233,8 @@
     execute_process(
       COMMAND ${LLVM_CONFIG_PATH} "--ldflags" "--libs" "xray"
       RESULT_VARIABLE HAD_ERROR
-      OUTPUT_VARIABLE CONFIG_OUTPUT)
+      OUTPUT_VARIABLE CONFIG_OUTPUT
+      ERROR_QUIET)
     if (HAD_ERROR)
       message(WARNING "llvm-config finding xray failed with status ${HAD_ERROR}")
       set(COMPILER_RT_HAS_LLVMXRAY FALSE)
@@ -250,7 +251,8 @@
     execute_process(
       COMMAND ${LLVM_CONFIG_PATH} "--ldflags" "--libs" "testingsupport"
       RESULT_VARIABLE HAD_ERROR
-      OUTPUT_VARIABLE CONFIG_OUTPUT)
+      OUTPUT_VARIABLE CONFIG_OUTPUT
+      ERROR_QUIET)
     if (HAD_ERROR)
       message(WARNING "llvm-config finding testingsupport failed with status ${HAD_ERROR}")
     else()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58086.186362.patch
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190212/0b20481d/attachment.bin>


More information about the llvm-commits mailing list