forked from OSchip/llvm-project
[scudo] Skip building scudo standalone if sys/auxv.h can't be found
Summary:
Since commit c299d1981d
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
This commit is contained in:
parent
33fa6727b7
commit
f4ca2ac822
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue