[llvm] r271492 - [LibFuzzer] Disable compiling and running the LibFuzzer dataflow sanitizer tests on Apple platforms.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 22:48:09 PDT 2016
Author: delcypher
Date: Thu Jun 2 00:48:09 2016
New Revision: 271492
URL: http://llvm.org/viewvc/llvm-project?rev=271492&view=rev
Log:
[LibFuzzer] Disable compiling and running the LibFuzzer dataflow sanitizer tests on Apple platforms.
This fixes a broken part of the build on OSX as the dataflow sanitizer is not supported
on OSX yet.
Differential Revision: http://reviews.llvm.org/D20894
Modified:
llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
llvm/trunk/lib/Fuzzer/test/fuzzer-dfsan.test
llvm/trunk/lib/Fuzzer/test/lit.cfg
llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
Modified: llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/CMakeLists.txt?rev=271492&r1=271491&r2=271492&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/CMakeLists.txt (original)
+++ llvm/trunk/lib/Fuzzer/test/CMakeLists.txt Thu Jun 2 00:48:09 2016
@@ -126,7 +126,17 @@ set_target_properties(LLVMFuzzer-Unittes
###############################################################################
include_directories(..)
-add_subdirectory(dfsan)
+
+if(APPLE)
+ message(WARNING "Dataflow sanitizer is not supported on Apple platforms."
+ " Building and running LibFuzzer dataflow sanitizer tests is disabled."
+ )
+ set(HAS_DFSAN 0)
+else()
+ set(HAS_DFSAN 1)
+ add_subdirectory(dfsan)
+endif()
+
add_subdirectory(uninstrumented)
add_subdirectory(ubsan)
add_subdirectory(trace-bb)
Modified: llvm/trunk/lib/Fuzzer/test/fuzzer-dfsan.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/fuzzer-dfsan.test?rev=271492&r1=271491&r2=271492&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/fuzzer-dfsan.test (original)
+++ llvm/trunk/lib/Fuzzer/test/fuzzer-dfsan.test Thu Jun 2 00:48:09 2016
@@ -1,3 +1,4 @@
+REQUIRES: dfsan
CHECK1: BINGO
CHECK2: BINGO
CHECK3: BINGO
Modified: llvm/trunk/lib/Fuzzer/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/lit.cfg?rev=271492&r1=271491&r2=271492&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/lit.cfg (original)
+++ llvm/trunk/lib/Fuzzer/test/lit.cfg Thu Jun 2 00:48:09 2016
@@ -13,3 +13,9 @@ path = os.path.pathsep.join((llvm_tools_
config.environment['PATH']))
config.environment['PATH'] = path
+if config.has_dfsan:
+ lit_config.note('dfsan feature available')
+ config.available_features.add('dfsan')
+else:
+ lit_config.note('dfsan feature unavailable')
+
Modified: llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in?rev=271492&r1=271491&r2=271492&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in (original)
+++ llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in Thu Jun 2 00:48:09 2016
@@ -1,3 +1,4 @@
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+config.has_dfsan = True if @HAS_DFSAN@ == 1 else False
lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
More information about the llvm-commits
mailing list