[clang] [Driver] Add options to control workaround for Cortex-A53 Erratum 843419 (PR #143915)

David Green via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 16 01:08:12 PDT 2025


================
@@ -91,7 +91,9 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("--execute-only");
 
     std::string CPU = getCPUName(D, Args, Triple);
-    if (CPU.empty() || CPU == "generic" || CPU == "cortex-a53")
+    if (Args.hasFlag(options::OPT_mfix_cortex_a53_843419,
+                     options::OPT_mno_fix_cortex_a53_843419, true) &&
----------------
davemgreen wrote:

I was wondering if the option should always be honoured if it was present (with any CPU). If it isn't present then we enable it with a generic or empty or a53 CPU. But that doesn't look like how the GCC option is specified in the docs.

It should ideally be automatically disabled if the archecture is armv8.1-a or later, as that code cannot run on cortex-a53. That is probably a separate issue though, and would equally apply to mfix_cortex_a53_835769 too.

https://github.com/llvm/llvm-project/pull/143915


More information about the cfe-commits mailing list