[llvm] Workaround MSVC Linker Issue when Cross-Compiling for ARM64EC (PR #143659)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 11 00:27:38 PDT 2025


================
@@ -4729,6 +4729,8 @@ AsmPrinter::getCodeViewJumpTableInfo(int JTI, const MachineInstr *BranchInstr,
                          codeview::JumpTableEntrySize::Int32);
 }
 
+static const std::string HPSuffix = ("$" + HybridPatchableTargetSuffix).str();
----------------
efriedma-quic wrote:

We usually try to avoid global constructors...

Maybe try something like the following:

```
constexpr char HybridPatchableTargetSuffix_Arr[] = "$hp_target";
constexpr std::string_view HybridPatchableTargetSuffix = HybridPatchableTargetSuffix_Arr;
```

That should avoid declaring any symbols with `$hp_target` in the mangled name, I think.

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


More information about the llvm-commits mailing list