[clang] b356cd7 - [hwasan] remove requirment for PIE
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 12 23:16:10 PDT 2023
Author: Enna1
Date: 2023-04-13T14:15:32+08:00
New Revision: b356cd70a27dd5be2cbcc72e9f1ac56f1fb788cb
URL: https://github.com/llvm/llvm-project/commit/b356cd70a27dd5be2cbcc72e9f1ac56f1fb788cb
DIFF: https://github.com/llvm/llvm-project/commit/b356cd70a27dd5be2cbcc72e9f1ac56f1fb788cb.diff
LOG: [hwasan] remove requirment for PIE
The requirement for PIE of hwasan was introduced in https://reviews.llvm.org/D44745, this patch removes requirement for PIE.
Reviewed By: vitalybuka, MaskRay
Differential Revision: https://reviews.llvm.org/D147121
Added:
Modified:
clang/lib/Driver/SanitizerArgs.cpp
clang/test/Driver/sanitizer-ld.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp
index 3f5b67e5f9b01..3c24089e0157a 100644
--- a/clang/lib/Driver/SanitizerArgs.cpp
+++ b/clang/lib/Driver/SanitizerArgs.cpp
@@ -39,8 +39,7 @@ static const SanitizerMask NotAllowedWithTrap = SanitizerKind::Vptr;
static const SanitizerMask NotAllowedWithMinimalRuntime =
SanitizerKind::Function | SanitizerKind::Vptr;
static const SanitizerMask RequiresPIE =
- SanitizerKind::DataFlow | SanitizerKind::HWAddress | SanitizerKind::Scudo |
- SanitizerKind::KCFI;
+ SanitizerKind::DataFlow | SanitizerKind::Scudo | SanitizerKind::KCFI;
static const SanitizerMask NeedsUnwindTables =
SanitizerKind::Address | SanitizerKind::HWAddress | SanitizerKind::Thread |
SanitizerKind::Memory | SanitizerKind::DataFlow;
diff --git a/clang/test/Driver/sanitizer-ld.c b/clang/test/Driver/sanitizer-ld.c
index 8192672b73fce..e46f08d8b4c80 100644
--- a/clang/test/Driver/sanitizer-ld.c
+++ b/clang/test/Driver/sanitizer-ld.c
@@ -961,7 +961,6 @@
// RUN: | FileCheck --check-prefix=CHECK-HWASAN-X86-64-LINUX %s
//
// CHECK-HWASAN-X86-64-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
-// CHECK-HWASAN-X86-64-LINUX: "-pie"
// CHECK-HWASAN-X86-64-LINUX-NOT: "-lc"
// CHECK-HWASAN-X86-64-LINUX: libclang_rt.hwasan-x86_64.a"
// CHECK-HWASAN-X86-64-LINUX-NOT: "--export-dynamic"
@@ -979,7 +978,6 @@
// RUN: | FileCheck --check-prefix=CHECK-SHARED-HWASAN-X86-64-LINUX %s
//
// CHECK-SHARED-HWASAN-X86-64-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
-// CHECK-SHARED-HWASAN-X86-64-LINUX: "-pie"
// CHECK-SHARED-HWASAN-X86-64-LINUX-NOT: "-lc"
// CHECK-SHARED-HWASAN-X86-64-LINUX: libclang_rt.hwasan-x86_64.so"
// CHECK-SHARED-HWASAN-X86-64-LINUX-NOT: "-lpthread"
@@ -996,7 +994,6 @@
// RUN: | FileCheck --check-prefix=CHECK-DSO-SHARED-HWASAN-X86-64-LINUX %s
//
// CHECK-DSO-SHARED-HWASAN-X86-64-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
-// CHECK-DSO_SHARED-HWASAN-X86-64-LINUX: "-pie"
// CHECK-DSO-SHARED-HWASAN-X86-64-LINUX-NOT: "-lc"
// CHECK-DSO-SHARED-HWASAN-X86-64-LINUX: libclang_rt.hwasan-x86_64.so"
// CHECK-DSO-SHARED-HWASAN-X86-64-LINUX-NOT: "-lpthread"
@@ -1013,7 +1010,6 @@
// RUN: | FileCheck --check-prefix=CHECK-HWASAN-AARCH64-LINUX %s
//
// CHECK-HWASAN-AARCH64-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
-// CHECK-HWASAN-AARCH64-LINUX: "-pie"
// CHECK-HWASAN-AARCH64-LINUX-NOT: "-lc"
// CHECK-HWASAN-AARCH64-LINUX: libclang_rt.hwasan-aarch64.a"
// CHECK-HWASAN-AARCH64-LINUX-NOT: "--export-dynamic"
@@ -1032,7 +1028,6 @@
// RUN: | FileCheck --check-prefix=CHECK-SHARED-HWASAN-AARCH64-LINUX %s
//
// CHECK-SHARED-HWASAN-AARCH64-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
-// CHECK-SHARED-HWASAN-AARCH64-LINUX: "-pie"
// CHECK-SHARED-HWASAN-AARCH64-LINUX-NOT: "-lc"
// CHECK-SHARED-HWASAN-AARCH64-LINUX: libclang_rt.hwasan-aarch64.so"
// CHECK-SHARED-HWASAN-AARCH64-LINUX-NOT: "-lpthread"
@@ -1049,7 +1044,6 @@
// RUN: | FileCheck --check-prefix=CHECK-DSO-SHARED-HWASAN-AARCH64-LINUX %s
//
// CHECK-DSO-SHARED-HWASAN-AARCH64-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
-// CHECK-DSO_SHARED-HWASAN-AARCH64-LINUX: "-pie"
// CHECK-DSO-SHARED-HWASAN-AARCH64-LINUX-NOT: "-lc"
// CHECK-DSO-SHARED-HWASAN-AARCH64-LINUX: libclang_rt.hwasan-aarch64.so"
// CHECK-DSO-SHARED-HWASAN-AARCH64-LINUX-NOT: "-lpthread"
More information about the cfe-commits
mailing list