Revert r191947. The problem is not MIPS-specific and requires more
general solution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191951 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index d2ca9fb..2f824cb 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -2139,13 +2139,7 @@
if (KernelOrKext &&
(!Triple.isiOS() || Triple.isOSVersionLT(6)))
PIC = PIE = false;
- // Usually '-static' implies no-PIC. But for MIPS '-fPIC -static' means
- // to compile as -fPIC but link with -static.
- if (Args.hasArg(options::OPT_static) &&
- getToolChain().getArch() != llvm::Triple::mips &&
- getToolChain().getArch() != llvm::Triple::mipsel &&
- getToolChain().getArch() != llvm::Triple::mips64 &&
- getToolChain().getArch() != llvm::Triple::mips64el)
+ if (Args.hasArg(options::OPT_static))
PIC = PIE = false;
if (Arg *A = Args.getLastArg(options::OPT_mdynamic_no_pic)) {