From f77d33e39d652c4af04684d34137430fcf740c06 Mon Sep 17 00:00:00 2001 From: Jiachen Yuan Date: Wed, 11 Jun 2025 10:04:00 -0700 Subject: [PATCH] use indirect assignment --- llvm/include/llvm/IR/Mangler.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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.