phosek added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:91
+    std::string CPU = getCPUName(D, Args, Triple);
+    if (CPU.empty() || CPU == "generic" || CPU == "cortex-a53")
+      CmdArgs.push_back("--fix-cortex-a53-843419");
----------------
mcgrathr wrote:
> How does this relate to -march, -mtune, and/or -mcpu?
> It's not at all clear to me how we discern automatically when a A53 might be 
> included in the supported target CPU set.  I'm not entirely sure we should 
> have automatic injection in some cases where A53 is a valid target but not 
> all.  That is, if some compiler option combinations that produce code meant 
> to be compatible with an A53 won't automatically get the --fix option, then 
> perhaps it's better to require the explicit --fix option when supporting A53 
> is the explicit intent.
This is the same logic as used by the [Gnu 
driver](https://github.com/llvm/llvm-project/blob/7a7c059d867554e116244ad5639d05d75ed1a7cd/clang/lib/Driver/ToolChains/Gnu.cpp#L451).
 `getCPUName` only considers `-mcpu`, it ignores `-march` and `-mtune` as far 
as I can tell.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114023/new/

https://reviews.llvm.org/D114023

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to