pkgs/llvm-project/0004-clang-default-to-fno-semantic-interposition.patch
2023-12-08 21:44:38 -08:00

27 lines
1.1 KiB
Diff

From 8d10380e04a3ba4d9a5c56384503d3f88c273f81 Mon Sep 17 00:00:00 2001
From: q66 <q66@chimera-linux.org>
Date: Sat, 4 Nov 2023 09:11:58 +0100
Subject: [PATCH 4/6] clang: default to -fno-semantic-interposition
---
clang/lib/Driver/ToolChains/Clang.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 37a07b8f2..bd210683b 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -5312,9 +5312,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// The supported targets need to call AsmPrinter::getSymbolPreferLocal.
bool SupportsLocalAlias =
Triple.isAArch64() || Triple.isRISCV() || Triple.isX86();
- if (!A)
- CmdArgs.push_back("-fhalf-no-semantic-interposition");
- else if (A->getOption().matches(options::OPT_fsemantic_interposition))
+ if (A && A->getOption().matches(options::OPT_fsemantic_interposition))
A->render(Args, CmdArgs);
else if (!SupportsLocalAlias)
CmdArgs.push_back("-fhalf-no-semantic-interposition");
--
2.43.0