[PATCH] D41413: [scudo] Add -fsanitize=scudo option to Fuchsia.

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 21 14:05:26 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rC321314: [scudo] Add -fsanitize=scudo option to Fuchsia (authored by phosek, committed by ).
Herald added a subscriber: cfe-commits.

Repository:
  rC Clang

https://reviews.llvm.org/D41413

Files:
  lib/Driver/ToolChains/Fuchsia.cpp
  test/Driver/fuchsia.c


Index: lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- lib/Driver/ToolChains/Fuchsia.cpp
+++ lib/Driver/ToolChains/Fuchsia.cpp
@@ -280,5 +280,6 @@
   SanitizerMask Res = ToolChain::getSupportedSanitizers();
   Res |= SanitizerKind::SafeStack;
   Res |= SanitizerKind::Address;
+  Res |= SanitizerKind::Scudo;
   return Res;
 }
Index: test/Driver/fuchsia.c
===================================================================
--- test/Driver/fuchsia.c
+++ test/Driver/fuchsia.c
@@ -79,3 +79,20 @@
 // CHECK-ASAN-SHARED: "-fsanitize-address-globals-dead-stripping"
 // CHECK-ASAN-SHARED: "{{.*[/\\]}}libclang_rt.asan-x86_64.so"
 // CHECK-ASAN-SHARED-NOT: "{{.*[/\\]}}libclang_rt.asan-preinit-x86_64.a"
+
+// RUN: %clang %s -### --target=x86_64-fuchsia \
+// RUN:     -fsanitize=scudo 2>&1 \
+// RUN:     | FileCheck %s -check-prefix=CHECK-SCUDO-X86
+// CHECK-SCUDO-X86: "-fsanitize=scudo"
+// CHECK-SCUDO-X86: "-pie"
+
+// RUN: %clang %s -### --target=aarch64-fuchsia \
+// RUN:     -fsanitize=scudo 2>&1 \
+// RUN:     | FileCheck %s -check-prefix=CHECK-SCUDO-AARCH64
+// CHECK-SCUDO-AARCH64: "-fsanitize=scudo"
+// CHECK-SCUDO-AARCH64: "-pie"
+
+// RUN: %clang %s -### --target=x86_64-fuchsia \
+// RUN:     -fsanitize=scudo -fPIC -shared 2>&1 \
+// RUN:     | FileCheck %s -check-prefix=CHECK-SCUDO-SHARED
+// CHECK-SCUDO-SHARED: "-fsanitize=scudo"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41413.127941.patch
Type: text/x-patch
Size: 1407 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171221/7d444b27/attachment-0001.bin>


More information about the cfe-commits mailing list