Skip to content

Commit 625bfb7

Browse files
authored
Workaround MSVC Linker Issue when Cross-Compiling for ARM64EC (#143659)
This MR presents a temporary workaround for the issue described at #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.
1 parent d7e7f22 commit 625bfb7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

llvm/include/llvm/IR/Mangler.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@ class Triple;
2626
class Twine;
2727
class raw_ostream;
2828

29-
constexpr std::string_view HybridPatchableTargetSuffix = "$hp_target";
29+
// TODO: The weird assignment of HybridPatchableTargetSuffix below is a
30+
// temporary workaround for a linker failure that is only hit when compiling
31+
// llvm for arm64ec on windows. The description and context of the issue is at
32+
// https://github.com/llvm/llvm-project/issues/143575.
33+
// An upstream MSVC bug is filed at
34+
// https://developercommunity.visualstudio.com/t/MSVC-Linker-Issue-When-Cross-
35+
// Compiling-L/10920141.
36+
constexpr char HybridPatchableTargetSuffixArr[] = "$hp_target";
37+
constexpr std::string_view HybridPatchableTargetSuffix =
38+
HybridPatchableTargetSuffixArr;
3039

3140
class Mangler {
3241
/// We need to give global values the same name every time they are mangled.

0 commit comments

Comments
 (0)