aboutsummaryrefslogtreecommitdiff
path: root/llvm
diff options
context:
space:
mode:
authorJacek Caban <jacek@codeweavers.com>2024-04-04 14:25:54 +0200
committerGitHub <noreply@github.com>2024-04-04 14:25:54 +0200
commitff56584ee9c8a6d5430c0ba461540ccb6696ebc6 (patch)
tree313cb1bc5a6631a11b0f29aeca3e7e327addf503 /llvm
parenta8c59750d911eb30d5664696db19af445dd770f8 (diff)
downloadllvm-ff56584ee9c8a6d5430c0ba461540ccb6696ebc6.zip
llvm-ff56584ee9c8a6d5430c0ba461540ccb6696ebc6.tar.gz
llvm-ff56584ee9c8a6d5430c0ba461540ccb6696ebc6.tar.bz2
[LLD][COFF] Use getMachineArchType in LinkerDriver::getArch. (#87499)
Adds support for ARM64EC, which should use the same search paths as ARM64. It's similar to #87370 and #87495. The test is based on the existing x86 test. Generally ARM64EC libraries are shipped together with native ARM64 libraries (using ECSYMBOLS section mechanism). getMachineArchType uses Triple::thumb, while the existing implementation uses Triple::arm. It's ultimately passed to MSVCPaths.cpp functions, so modify them to accept both forms.
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/WindowsDriver/MSVCPaths.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/WindowsDriver/MSVCPaths.cpp b/llvm/lib/WindowsDriver/MSVCPaths.cpp
index 634cfcb..a7bffbb 100644
--- a/llvm/lib/WindowsDriver/MSVCPaths.cpp
+++ b/llvm/lib/WindowsDriver/MSVCPaths.cpp
@@ -268,6 +268,7 @@ const char *archToWindowsSDKArch(Triple::ArchType Arch) {
case Triple::ArchType::x86_64:
return "x64";
case Triple::ArchType::arm:
+ case Triple::ArchType::thumb:
return "arm";
case Triple::ArchType::aarch64:
return "arm64";
@@ -285,6 +286,7 @@ const char *archToLegacyVCArch(Triple::ArchType Arch) {
case Triple::ArchType::x86_64:
return "amd64";
case Triple::ArchType::arm:
+ case Triple::ArchType::thumb:
return "arm";
case Triple::ArchType::aarch64:
return "arm64";
@@ -300,6 +302,7 @@ const char *archToDevDivInternalArch(Triple::ArchType Arch) {
case Triple::ArchType::x86_64:
return "amd64";
case Triple::ArchType::arm:
+ case Triple::ArchType::thumb:
return "arm";
case Triple::ArchType::aarch64:
return "arm64";
@@ -321,6 +324,7 @@ bool appendArchToWindowsSDKLibPath(int SDKMajor, SmallString<128> LibPath,
sys::path::append(LibPath, "x64");
break;
case Triple::arm:
+ case Triple::thumb:
// It is not necessary to link against Windows SDK 7.x when targeting ARM.
return false;
default: