[llvm] 625bfb7 - Workaround MSVC Linker Issue when Cross-Compiling for ARM64EC (#143659)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 14:23:45 PDT 2025
Author: Jiachen Yuan
Date: 2025-06-11T14:23:41-07:00
New Revision: 625bfb7179ad1acab2aba1023095826628275a60
URL: https://github.com/llvm/llvm-project/commit/625bfb7179ad1acab2aba1023095826628275a60
DIFF: https://github.com/llvm/llvm-project/commit/625bfb7179ad1acab2aba1023095826628275a60.diff
LOG: Workaround MSVC Linker Issue when Cross-Compiling for ARM64EC (#143659)
This MR presents a temporary workaround for the issue described at
https://github.com/llvm/llvm-project/issues/143575. While an [upstream
MSVC
bug](https://developercommunity.visualstudio.com/t/MSVC-Linker-Issue-When-Cross-Compiling-L/10920141)
is reported, it makes sense to apply a workaround in LLVM code to
quickly unblock anyone affected.
Added:
Modified:
llvm/include/llvm/IR/Mangler.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/Mangler.h b/llvm/include/llvm/IR/Mangler.h
index e3dfe1eac6189..232101a8926b7 100644
--- a/llvm/include/llvm/IR/Mangler.h
+++ b/llvm/include/llvm/IR/Mangler.h
@@ -26,7 +26,16 @@ class Triple;
class Twine;
class raw_ostream;
-constexpr std::string_view HybridPatchableTargetSuffix = "$hp_target";
+// TODO: The weird assignment of HybridPatchableTargetSuffix below is a
+// temporary workaround for a linker failure that is only hit when compiling
+// llvm for arm64ec on windows. The description and context of the issue is at
+// https://github.com/llvm/llvm-project/issues/143575.
+// An upstream MSVC bug is filed at
+// https://developercommunity.visualstudio.com/t/MSVC-Linker-Issue-When-Cross-
+// Compiling-L/10920141.
+constexpr char HybridPatchableTargetSuffixArr[] = "$hp_target";
+constexpr std::string_view HybridPatchableTargetSuffix =
+ HybridPatchableTargetSuffixArr;
class Mangler {
/// We need to give global values the same name every time they are mangled.
More information about the llvm-commits
mailing list