You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2022/04/08 15:07:56 UTC
[kudu] 01/02: [cmake_modules] add '-o /dev/null' to the linker command
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit fe2ba596dda3872789de8d42ccc2b82b6db42d47
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Thu Apr 7 15:06:51 2022 -0700
[cmake_modules] add '-o /dev/null' to the linker command
I noticed that every time I run cmake in the build directory
on macOS, a.out file appears. It turned out it's generated
by the GET_LINKER_VERSION procedure from KuduLinker.cmake.
This patch add '-o /dev/null' to the command that determines
the version of the linker to avoid generating a.out file
in the current working directory.
Change-Id: Id095902679a2f0e2648c45bcd4024fc734b9a1e7
Reviewed-on: http://gerrit.cloudera.org:8080/18394
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
cmake_modules/KuduLinker.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake_modules/KuduLinker.cmake b/cmake_modules/KuduLinker.cmake
index d8dacfc21..0725bb03d 100644
--- a/cmake_modules/KuduLinker.cmake
+++ b/cmake_modules/KuduLinker.cmake
@@ -113,7 +113,7 @@ function(GET_LINKER_VERSION)
set(ld_version_flag "--version")
endif()
execute_process(
- COMMAND ${CMAKE_CXX_COMPILER} "-Wl,${ld_version_flag}" ${ARGN}
+ COMMAND ${CMAKE_CXX_COMPILER} "-Wl,${ld_version_flag}" -o /dev/null ${ARGN}
ERROR_VARIABLE LINKER_STDERR
OUTPUT_VARIABLE LINKER_STDOUT
RESULT_VARIABLE LINKER_EXITCODE)