[fuzzer] move default sanitizer options to a separate file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228429 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany 2015-02-06 19:52:07 +00:00
parent 1a05c567d6
commit 9b13b8c338
3 changed files with 19 additions and 7 deletions

View File

@ -6,6 +6,7 @@ if( LLVM_USE_SANITIZE_COVERAGE )
FuzzerIO.cpp
FuzzerLoop.cpp
FuzzerMutate.cpp
FuzzerSanitizerOptions.cpp
FuzzerUtil.cpp
)
add_library(LLVMFuzzer STATIC

View File

@ -18,13 +18,6 @@
#include <atomic>
#include <mutex>
// ASAN options:
// * don't dump the coverage to disk.
// * enable coverage by default.
extern "C" const char *__asan_default_options() {
return "coverage_pcs=0:coverage=1";
}
// Program arguments.
struct FlagDescription {
const char *Name;

View File

@ -0,0 +1,18 @@
//===- FuzzerSanitizerOptions.cpp - default flags for sanitizers ----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Set default options for sanitizers while running the fuzzer.
// Options reside in a separate file, so if we don't want to set the default
// options we simply do not link this file in.
// ASAN options:
// * don't dump the coverage to disk.
// * enable coverage by default.
//===----------------------------------------------------------------------===//
extern "C" const char *__asan_default_options() {
return "coverage_pcs=0:coverage=1";
}