[llvm] def62c7 - [NFC] Remove ar/ranlib test noise during cmake step
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 02:26:40 PST 2020
Author: serge-sans-paille
Date: 2020-02-20T11:26:26+01:00
New Revision: def62c7f6548104274f95154bb5a91264646c701
URL: https://github.com/llvm/llvm-project/commit/def62c7f6548104274f95154bb5a91264646c701
DIFF: https://github.com/llvm/llvm-project/commit/def62c7f6548104274f95154bb5a91264646c701.diff
LOG: [NFC] Remove ar/ranlib test noise during cmake step
At least on RHEL, ar outputs on stderr a message similar to
.../bin/ar: creating t.a
Which creates noise during the cmake step. Get rid of it.
Added:
Modified:
llvm/cmake/modules/HandleLLVMOptions.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 1c75c8ea35be..29a914cf59af 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -140,13 +140,21 @@ endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# RHEL7 has ar and ranlib being non-deterministic by default. The D flag forces determinism,
- # however only GNU version of ar and ranlib (2.27) have this option.
+ # however only GNU version of ar and ranlib (2.27) have this option.
# RHEL DTS7 is also affected by this, which uses GNU binutils 2.28
execute_process(COMMAND ${CMAKE_AR} rD t.a
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} RESULT_VARIABLE AR_RESULT OUTPUT_VARIABLE RANLIB_OUTPUT)
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ RESULT_VARIABLE AR_RESULT
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )
if(${AR_RESULT} EQUAL 0)
execute_process(COMMAND ${CMAKE_RANLIB} -D t.a
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} RESULT_VARIABLE RANLIB_RESULT OUTPUT_VARIABLE RANLIB_OUTPUT)
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ RESULT_VARIABLE RANLIB_RESULT
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )
if(${RANLIB_RESULT} EQUAL 0)
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Dqc <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> Dq <TARGET> <LINK_FLAGS> <OBJECTS>")
More information about the llvm-commits
mailing list