Skip to content

Commit

Permalink
[CMake][XRay] Silence llvm-config error when checking library support
Browse files Browse the repository at this point in the history
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.

Differential Revision: https://reviews.llvm.org/D58086

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@353784 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
petrhosek committed Feb 12, 2019
1 parent f458106 commit 785ce57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmake/Modules/CompilerRTUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ macro(load_llvm_config)
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)
Expand All @@ -250,7 +251,8 @@ macro(load_llvm_config)
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()
Expand Down

0 comments on commit 785ce57

Please sign in to comment.