[compiler-rt] f4ca2ac - [scudo] Skip building scudo standalone if sys/auxv.h can't be found
Bjorn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 09:21:52 PST 2020
Author: Bjorn Pettersson
Date: 2020-01-29T18:18:59+01:00
New Revision: f4ca2ac8225e090a7c351c7e1219bcae8838d4e0
URL: https://github.com/llvm/llvm-project/commit/f4ca2ac8225e090a7c351c7e1219bcae8838d4e0
DIFF: https://github.com/llvm/llvm-project/commit/f4ca2ac8225e090a7c351c7e1219bcae8838d4e0.diff
LOG: [scudo] Skip building scudo standalone if sys/auxv.h can't be found
Summary:
Since commit c299d1981deaf822dfaa06c791f3158bd6801e20 scudo
standalone can't be built without including sys/auxv.h.
I do not have that file on my system, and my builds have failed
when trying to simply build "all" runtimes. Assuming that "all"
means "all possible given the current environment" we need to
guard the setting of COMPILER_RT_HAS_SCUDO_STANDALONE=TRUE by
first checking if sys/auxv.h can be found.
Reviewers: pcc, cryptoad
Reviewed By: pcc
Subscribers: mgorny, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73631
Added:
Modified:
compiler-rt/cmake/config-ix.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 6a9f7f3c84a5..6c4856f05a2d 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -1,6 +1,7 @@
include(CMakePushCheckState)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
+include(CheckIncludeFiles)
include(CheckLibraryExists)
include(CheckSymbolExists)
include(TestBigEndian)
@@ -116,6 +117,9 @@ check_cxx_compiler_flag(/wd4800 COMPILER_RT_HAS_WD4800_FLAG)
# Symbols.
check_symbol_exists(__func__ "" COMPILER_RT_HAS_FUNC_SYMBOL)
+# Includes.
+check_include_files("sys/auxv.h" COMPILER_RT_HAS_AUXV)
+
# Libraries.
check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL)
check_library_exists(rt shm_open "" COMPILER_RT_HAS_LIBRT)
@@ -702,7 +706,8 @@ else()
endif()
#TODO(kostyak): add back Android & Fuchsia when the code settles a bit.
-if (SCUDO_STANDALONE_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux")
+if (SCUDO_STANDALONE_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux" AND
+ COMPILER_RT_HAS_AUXV)
set(COMPILER_RT_HAS_SCUDO_STANDALONE TRUE)
else()
set(COMPILER_RT_HAS_SCUDO_STANDALONE FALSE)
More information about the llvm-commits
mailing list