diff options
author | Michal Gorny <mgorny@gentoo.org> | 2019-01-14 19:18:34 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2019-01-14 19:18:34 +0000 |
commit | 3a41962911d388077d5f300a5cae0d4093525678 (patch) | |
tree | d82071d99f946a3bff6575ede5e111478759fc51 /cmake/base-config-ix.cmake | |
parent | 07d40687af305eb476302753ff858e49c9902b95 (diff) | |
download | compiler-rt-3a41962911d388077d5f300a5cae0d4093525678.tar.gz |
[test] Disable sunrpc tests when rpc/xdr.h is missing
Disable tests requiring sunrpc when the relevant headers are missing.
In order to accommodate that, move the header check
from sanitizer_common to base-config-ix, and define the check result
as a global variable there. Use it afterwards both for definition
needed by sanitizer_common, and to control 'sunrpc' test feature.
While at it, remove the append_have_file_definition macro that was used
only once, and no longer fits the split check-definition.
Bug report: https://github.com/google/sanitizers/issues/974
Differential Revision: https://reviews.llvm.org/D47819
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/base-config-ix.cmake')
-rw-r--r-- | cmake/base-config-ix.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake index 2a44d830b..6684d7371 100644 --- a/cmake/base-config-ix.cmake +++ b/cmake/base-config-ix.cmake @@ -8,6 +8,12 @@ include(CheckCXXSourceCompiles) check_include_file(unwind.h HAVE_UNWIND_H) +# Used by sanitizer_common and tests. +check_include_file(rpc/xdr.h HAVE_RPC_XDR_H) +if (NOT HAVE_RPC_XDR_H) + set(HAVE_RPC_XDR_H 0) +endif() + # Top level target used to build all compiler-rt libraries. add_custom_target(compiler-rt ALL) add_custom_target(install-compiler-rt) |