[clang] d74619a - [clang] [MinGW] Handle linking ARM64EC code (#78912)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 31 03:51:16 PST 2024
Author: Billy Laws
Date: 2024-01-31T13:51:12+02:00
New Revision: d74619abb53bc9c5680f83bb1dead9c65135ecc6
URL: https://github.com/llvm/llvm-project/commit/d74619abb53bc9c5680f83bb1dead9c65135ecc6
DIFF: https://github.com/llvm/llvm-project/commit/d74619abb53bc9c5680f83bb1dead9c65135ecc6.diff
LOG: [clang] [MinGW] Handle linking ARM64EC code (#78912)
Added:
Modified:
clang/lib/Driver/ToolChains/MinGW.cpp
clang/test/Driver/mingw.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp
index 067758c05e97c..2b7fc104ea95a 100644
--- a/clang/lib/Driver/ToolChains/MinGW.cpp
+++ b/clang/lib/Driver/ToolChains/MinGW.cpp
@@ -132,7 +132,10 @@ void tools::MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("thumb2pe");
break;
case llvm::Triple::aarch64:
- CmdArgs.push_back("arm64pe");
+ if (TC.getEffectiveTriple().isWindowsArm64EC())
+ CmdArgs.push_back("arm64ecpe");
+ else
+ CmdArgs.push_back("arm64pe");
break;
default:
D.Diag(diag::err_target_unknown_triple) << TC.getEffectiveTriple().str();
diff --git a/clang/test/Driver/mingw.cpp b/clang/test/Driver/mingw.cpp
index bb22a0652b486..e42ff4554e452 100644
--- a/clang/test/Driver/mingw.cpp
+++ b/clang/test/Driver/mingw.cpp
@@ -80,3 +80,7 @@
// RUN: %clang -target i686-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_NO_INIT_ARRAY %s
// CHECK_NO_INIT_ARRAY: "-fno-use-init-array"
+
+// RUN: %clang -target arm64ec-windows-gnu -### -o /dev/null %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix CHECK_MINGW_EC_LINK
+// CHECK_MINGW_EC_LINK: "-m" "arm64ecpe"
More information about the cfe-commits
mailing list