From a993ee9f0f69ed87565d581dccc801934dccc937 Mon Sep 17 00:00:00 2001 From: Derek Bruening Date: Fri, 20 May 2016 19:26:52 +0000 Subject: [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 --- lib/esan/esan.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'lib/esan/esan.cpp') 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) { -- cgit v1.2.3