[flang-commits] [clang] [flang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)
Brad King via flang-commits
flang-commits at lists.llvm.org
Mon Nov 27 12:08:52 PST 2023
================
@@ -204,6 +204,29 @@ void Flang::AddAArch64TargetArgs(const ArgList &Args,
}
}
+static void addVSDefines(const ToolChain &TC, const ArgList &Args,
+ ArgStringList &CmdArgs) {
+
+ unsigned ver = 0;
+ const VersionTuple vt = TC.computeMSVCVersion(nullptr, Args);
+ ver = vt.getMajor() * 10000000 + vt.getMinor().value_or(0) * 100000 +
+ vt.getSubminor().value_or(0);
+ CmdArgs.push_back(Args.MakeArgString("-D_MSC_VER=" + Twine(ver / 100000)));
+ CmdArgs.push_back(Args.MakeArgString("-D_MSC_FULL_VER=" + Twine(ver)));
+
+ llvm::Triple triple = TC.getTriple();
+ if (triple.isAArch64()) {
+ CmdArgs.push_back("-D_M_ARM64=1");
----------------
bradking wrote:
Does LLVM/Flang support the `_M_ARM64EC` ABI?
https://github.com/llvm/llvm-project/pull/73250
More information about the flang-commits
mailing list