From 9207479baf882370d95d8e8e05884ca80327140c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= <mati865@gmail.com>
Date: Thu, 13 May 2021 20:33:10 +0200
Subject: [PATCH] Disable fPIC errors

---
 lib/Driver/ToolChains/CommonArgs.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp
index e8fdb0813786..ac8dfc0153a4 100644
--- a/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/lib/Driver/ToolChains/CommonArgs.cpp
@@ -1178,7 +1178,7 @@ tools::ParsePICArgs(const ToolChain &ToolChain, const ArgList &Args) {
                                     options::OPT_fpic, options::OPT_fno_pic,
                                     options::OPT_fPIE, options::OPT_fno_PIE,
                                     options::OPT_fpie, options::OPT_fno_pie);
-  if (Triple.isOSWindows() && LastPICArg &&
+  if (Triple.isWindowsMSVCEnvironment() && LastPICArg &&
       LastPICArg ==
           Args.getLastArg(options::OPT_fPIC, options::OPT_fpic,
                           options::OPT_fPIE, options::OPT_fpie)) {
-- 
2.31.1.windows.1

