You've already forked linux-packaging-mono
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
cmake
docs
include
lib
BlocksRuntime
asan
builtins
cfi
dfsan
esan
CMakeLists.txt
cache_frag.cpp
cache_frag.h
esan.cpp
esan.h
esan.syms.extra
esan_circular_buffer.h
esan_flags.cpp
esan_flags.h
esan_flags.inc
esan_hashtable.h
esan_interceptors.cpp
esan_interface.cpp
esan_interface_internal.h
esan_linux.cpp
esan_shadow.h
esan_sideline.h
esan_sideline_linux.cpp
working_set.cpp
working_set.h
working_set_posix.cpp
fuzzer
hwasan
interception
lsan
msan
profile
safestack
sanitizer_common
scudo
stats
tsan
ubsan
ubsan_minimal
xray
CMakeLists.txt
test
unittests
www
.arcconfig
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
eng
libcxx
libcxxabi
libunwind
lld
lldb
llvm
nuget
openmp
polly
Directory.Build.props
Directory.Build.targets
NuGet.config
azure-pipelines.yml
build.cmd
build.sh
dir.common.props
global.json
llvm.proj
mxe-Win64.cmake.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
61 lines
1.6 KiB
C++
61 lines
1.6 KiB
C++
![]() |
//===-- esan_flags.cc -------------------------------------------*- C++ -*-===//
|
||
|
//
|
||
|
// The LLVM Compiler Infrastructure
|
||
|
//
|
||
|
// This file is distributed under the University of Illinois Open Source
|
||
|
// License. See LICENSE.TXT for details.
|
||
|
//
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
//
|
||
|
// This file is a part of EfficiencySanitizer, a family of performance tuners.
|
||
|
//
|
||
|
// Esan flag parsing logic.
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
|
||
|
#include "esan_flags.h"
|
||
|
#include "sanitizer_common/sanitizer_common.h"
|
||
|
#include "sanitizer_common/sanitizer_flag_parser.h"
|
||
|
#include "sanitizer_common/sanitizer_flags.h"
|
||
|
|
||
|
using namespace __sanitizer;
|
||
|
|
||
|
namespace __esan {
|
||
|
|
||
|
static const char EsanOptsEnv[] = "ESAN_OPTIONS";
|
||
|
|
||
|
Flags EsanFlagsDontUseDirectly;
|
||
|
|
||
|
void Flags::setDefaults() {
|
||
|
#define ESAN_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue;
|
||
|
#include "esan_flags.inc"
|
||
|
#undef ESAN_FLAG
|
||
|
}
|
||
|
|
||
|
static void registerEsanFlags(FlagParser *Parser, Flags *F) {
|
||
|
#define ESAN_FLAG(Type, Name, DefaultValue, Description) \
|
||
|
RegisterFlag(Parser, #Name, Description, &F->Name);
|
||
|
#include "esan_flags.inc"
|
||
|
#undef ESAN_FLAG
|
||
|
}
|
||
|
|
||
|
void initializeFlags() {
|
||
|
SetCommonFlagsDefaults();
|
||
|
Flags *F = getFlags();
|
||
|
F->setDefaults();
|
||
|
|
||
|
FlagParser Parser;
|
||
|
registerEsanFlags(&Parser, F);
|
||
|
RegisterCommonFlags(&Parser);
|
||
|
Parser.ParseString(GetEnv(EsanOptsEnv));
|
||
|
|
||
|
InitializeCommonFlags();
|
||
|
if (Verbosity())
|
||
|
ReportUnrecognizedFlags();
|
||
|
if (common_flags()->help)
|
||
|
Parser.PrintFlagDescriptions();
|
||
|
|
||
|
__sanitizer_set_report_path(common_flags()->log_path);
|
||
|
}
|
||
|
|
||
|
} // namespace __esan
|