[clang] clang/ARM: Derive -pg mcount name from the triple environment (PR #220822)

Peter Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 3 10:53:04 PDT 2026


================
@@ -205,7 +205,9 @@ AArch64TargetInfo::AArch64TargetInfo(const llvm::Triple &Triple,
     this->MCountName = "\01_mcount";
   else if (Triple.getOS() == llvm::Triple::UnknownOS)
     this->MCountName =
-        Opts.EABIVersion == llvm::EABI::GNU ? "\01_mcount" : "mcount";
+        (Opts.EABIVersion == llvm::EABI::GNU || Triple.isGNUEnvironment())
----------------
smithp35 wrote:

Perhaps
```
(Opts.EABIVersion == llvm::EABI::GNU || 
 (Opts.EABIVersion == llvm::EABI::Default && Triple.isGNUEnvironment()))
```
So that if someone does something like `-meabi=5` with a GNU environment they get the none GNU names.

Same comment for AArch64 and Arm. 

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


More information about the cfe-commits mailing list