diff options
author | Derek Bruening <bruening@google.com> | 2016-05-20 19:26:52 +0000 |
---|---|---|
committer | Derek Bruening <bruening@google.com> | 2016-05-20 19:26:52 +0000 |
commit | a993ee9f0f69ed87565d581dccc801934dccc937 (patch) | |
tree | 8f4767ebe8d4b6d07585b6051be2540b59923614 /lib/esan/esan.cpp | |
parent | 920004a79066f0375f0c4dcbe38d4f1f225296ed (diff) |
[esan] Add custom flag support
Summary:
Adds custom flag support to EfficiencySanitizer's runtime library.
Adds an initial flag cache_line_size which will be used by multiple tools.
Reviewers: aizatsky, vitalybuka
Subscribers: llvm-commits, eugenis, kcc, zhaoqin, aizatsky, kubabrecka
Differential Revision: http://reviews.llvm.org/D20478
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/esan/esan.cpp')
-rw-r--r-- | lib/esan/esan.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/esan/esan.cpp b/lib/esan/esan.cpp index e16eea716..1499895eb 100644 --- a/lib/esan/esan.cpp +++ b/lib/esan/esan.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "esan.h" +#include "esan_flags.h" #include "esan_interface_internal.h" #include "esan_shadow.h" #include "sanitizer_common/sanitizer_common.h" @@ -30,8 +31,6 @@ bool EsanIsInitialized; ToolType WhichTool; ShadowMapping Mapping; -static const char EsanOptsEnv[] = "ESAN_OPTIONS"; - // We are combining multiple performance tuning tools under the umbrella of // one EfficiencySanitizer super-tool. Most of our tools have very similar // memory access instrumentation, shadow memory mapping, libc interception, @@ -142,21 +141,6 @@ static void initializeShadow() { } } -static void initializeFlags() { - // Once we add our own flags we'll parse them here. - // For now the common ones are sufficient. - FlagParser Parser; - SetCommonFlagsDefaults(); - RegisterCommonFlags(&Parser); - Parser.ParseString(GetEnv(EsanOptsEnv)); - InitializeCommonFlags(); - if (Verbosity()) - ReportUnrecognizedFlags(); - if (common_flags()->help) - Parser.PrintFlagDescriptions(); - __sanitizer_set_report_path(common_flags()->log_path); -} - void initializeLibrary(ToolType Tool) { // We assume there is only one thread during init. if (EsanIsInitialized) { |