From: Pierre Gousseau Date: Tue, 2 Apr 2019 15:20:26 +0000 (+0000) Subject: [Driver] Enable -fsanitize-address-globals-dead-stripping by default on PS4. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b9527119f7e7678b9bae87aac4be7a40e468a8c;p=platform%2Fupstream%2Fllvm.git [Driver] Enable -fsanitize-address-globals-dead-stripping by default on PS4. Can be safely enabled on PS4. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D59815 llvm-svn: 357480 --- diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp index 6e2528a..d6cef88 100644 --- a/clang/lib/Driver/SanitizerArgs.cpp +++ b/clang/lib/Driver/SanitizerArgs.cpp @@ -768,6 +768,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, // See https://sourceware.org/bugzilla/show_bug.cgi?id=19002 AsanGlobalsDeadStripping = !TC.getTriple().isOSBinFormatELF() || TC.getTriple().isOSFuchsia() || + TC.getTriple().isPS4() || Args.hasArg(options::OPT_fsanitize_address_globals_dead_stripping); AsanUseOdrIndicator = diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c index ebfd762..454722a 100644 --- a/clang/test/Driver/fsanitize.c +++ b/clang/test/Driver/fsanitize.c @@ -221,6 +221,7 @@ // RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ASAN-GLOBALS // RUN: %clang_cl --target=x86_64-windows-msvc -fsanitize=address -fsanitize-address-globals-dead-stripping -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS // RUN: %clang_cl --target=x86_64-windows-msvc -fsanitize=address -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS +// RUN: %clang -target x86_64-scei-ps4 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS // CHECK-ASAN-GLOBALS: -cc1{{.*}}-fsanitize-address-globals-dead-stripping // CHECK-NO-ASAN-GLOBALS-NOT: -cc1{{.*}}-fsanitize-address-globals-dead-stripping