diff options
Diffstat (limited to 'llvm/lib/Fuzzer/test')
| -rw-r--r-- | llvm/lib/Fuzzer/test/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | llvm/lib/Fuzzer/test/fuzzer-dfsan.test | 1 | ||||
| -rw-r--r-- | llvm/lib/Fuzzer/test/lit.cfg | 6 | ||||
| -rw-r--r-- | llvm/lib/Fuzzer/test/lit.site.cfg.in | 1 |
4 files changed, 19 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/CMakeLists.txt b/llvm/lib/Fuzzer/test/CMakeLists.txt index a6702d059d8..7beae1da583 100644 --- a/llvm/lib/Fuzzer/test/CMakeLists.txt +++ b/llvm/lib/Fuzzer/test/CMakeLists.txt @@ -126,7 +126,17 @@ set_target_properties(LLVMFuzzer-Unittest ############################################################################### 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) diff --git a/llvm/lib/Fuzzer/test/fuzzer-dfsan.test b/llvm/lib/Fuzzer/test/fuzzer-dfsan.test index 6700771ed6e..5bd5c0f18d2 100644 --- a/llvm/lib/Fuzzer/test/fuzzer-dfsan.test +++ b/llvm/lib/Fuzzer/test/fuzzer-dfsan.test @@ -1,3 +1,4 @@ +REQUIRES: dfsan CHECK1: BINGO CHECK2: BINGO CHECK3: BINGO diff --git a/llvm/lib/Fuzzer/test/lit.cfg b/llvm/lib/Fuzzer/test/lit.cfg index 2140a97668b..5f52f643f75 100644 --- a/llvm/lib/Fuzzer/test/lit.cfg +++ b/llvm/lib/Fuzzer/test/lit.cfg @@ -13,3 +13,9 @@ path = os.path.pathsep.join((llvm_tools_dir, config.test_exec_root, 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') + diff --git a/llvm/lib/Fuzzer/test/lit.site.cfg.in b/llvm/lib/Fuzzer/test/lit.site.cfg.in index e520db8e881..48d9b361e18 100644 --- a/llvm/lib/Fuzzer/test/lit.site.cfg.in +++ b/llvm/lib/Fuzzer/test/lit.site.cfg.in @@ -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") |

