summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2016-11-17 16:55:40 +0000
committerAnna Zaks <ganna@apple.com>2016-11-17 16:55:40 +0000
commit9cd5ed12411d15a36cfef423824385773f4926d2 (patch)
tree48a54d202d61bd9782437aac06a645d0d71d042d
parentbac1c3ce85e1b9c489101b13395bb9a453691ac5 (diff)
downloadbcm5719-llvm-9cd5ed12411d15a36cfef423824385773f4926d2.tar.gz
bcm5719-llvm-9cd5ed12411d15a36cfef423824385773f4926d2.zip
[asan] Turn on Mach-O global metadata liveness tracking by default
This patch turns on the metadata liveness tracking since all known issues have been resolved. The future has been implemented in https://reviews.llvm.org/D16737 and enables support of dead code stripping option on Mach-O platforms. As part of enabling the feature, I also plan on reverting the following patch to compiler-rt: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160704/369910.html Differential Revision: https://reviews.llvm.org/D26772 llvm-svn: 287235
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp2
-rw-r--r--llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index eb942780481..ac1eebda259 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -268,7 +268,7 @@ static cl::opt<bool>
cl::desc("Use linker features to support dead "
"code stripping of globals "
"(Mach-O only)"),
- cl::Hidden, cl::init(false));
+ cl::Hidden, cl::init(true));
// Debug flags.
static cl::opt<int> ClDebug("asan-debug", cl::desc("debug"), cl::Hidden,
diff --git a/llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll b/llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll
index 25b76405a1c..82168175361 100644
--- a/llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll
+++ b/llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll
@@ -2,7 +2,7 @@
; allowing dead stripping to be performed, and that the appropriate runtime
; routines are invoked.
-; RUN: opt < %s -asan -asan-module -asan-globals-live-support -S | FileCheck %s
+; RUN: opt < %s -asan -asan-module -S | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
OpenPOWER on IntegriCloud