[Driver] -fsanitize=kcfi doesn't need RequiresPIE
authorFangrui Song <i@maskray.me>
Wed, 19 Apr 2023 20:10:46 +0000 (13:10 -0700)
committerFangrui Song <i@maskray.me>
Wed, 19 Apr 2023 20:10:46 +0000 (13:10 -0700)
As mentioned on D148671: this is unneeded. This commit is a no-op for most Linux
builds since CLANG_DEFAULT_PIE_ON_LINUX defaults to 1.

clang/lib/Driver/SanitizerArgs.cpp

index 3c24089..d0dd294 100644 (file)
@@ -39,7 +39,7 @@ static const SanitizerMask NotAllowedWithTrap = SanitizerKind::Vptr;
 static const SanitizerMask NotAllowedWithMinimalRuntime =
     SanitizerKind::Function | SanitizerKind::Vptr;
 static const SanitizerMask RequiresPIE =
-    SanitizerKind::DataFlow | SanitizerKind::Scudo | SanitizerKind::KCFI;
+    SanitizerKind::DataFlow | SanitizerKind::Scudo;
 static const SanitizerMask NeedsUnwindTables =
     SanitizerKind::Address | SanitizerKind::HWAddress | SanitizerKind::Thread |
     SanitizerKind::Memory | SanitizerKind::DataFlow;