From 9ada3d5a137f5edba7a599ca83e488c76681bbf9 Mon Sep 17 00:00:00 2001 From: Amy Huang Date: Thu, 15 Sep 2022 20:23:25 +0000 Subject: [PATCH] Fix error in clang /MT equivalent flag patch. This is a followup to reviews.llvm.org/D133457. --- clang/lib/Driver/ToolChains/Clang.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 9737a0e..e215dc0 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -6543,7 +6543,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (IsMSVCCompat) CmdArgs.push_back("-fms-compatibility"); - if (Triple.isWindowsMSVCEnvironment() && !D.IsCLMode()) + if (Triple.isWindowsMSVCEnvironment() && !D.IsCLMode() && + Args.hasArg(options::OPT_fms_runtime_lib_EQ)) ProcessVSRuntimeLibrary(Args, CmdArgs); // Handle -fgcc-version, if present. -- 2.7.4