]> granicus.if.org Git - clang/commitdiff
Revert "clang-cl: Hook up /Za to prevent adding oldnames.lib dependency"
authorReid Kleckner <reid@kleckner.net>
Thu, 8 Aug 2013 19:33:10 +0000 (19:33 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 8 Aug 2013 19:33:10 +0000 (19:33 +0000)
This reverts commit r187991 and adjusts the comment.  /Za is much more
involved, and we don't want to give anyone the impression we actually
support it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187998 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CLCompatOptions.td
lib/Driver/Tools.cpp
test/Driver/cl-Za.c [deleted file]

index 197ae9ebe5fa7037c95195e33a77d2ff2feafdfe..746b4d12b505da8c16c5267cb56cbb3840574ab8 100644 (file)
@@ -98,7 +98,6 @@ def _SLASH_TC : CLFlag<"TC">, HelpText<"Treat all source files as C">;
 def _SLASH_Tp : CLJoinedOrSeparate<"Tp">, HelpText<"Specify a C++ source file">,
   MetaVarName<"<filename>">;
 def _SLASH_TP : CLFlag<"TP">, HelpText<"Treat all source files as C++">;
-def _SLASH_Za : CLFlag<"Za">;
 
 
 // Ignored:
@@ -130,6 +129,7 @@ def _SLASH_Oi : CLFlag<"Oi">;
 def _SLASH_RTC : CLJoined<"RTC">;
 def _SLASH_showIncludes : CLJoined<"showIncludes">;
 def _SLASH_w : CLJoined<"w">;
+def _SLASH_Za : CLFlag<"Za">;
 def _SLASH_Zc : CLJoined<"Zc:">;
 def _SLASH_ZI : CLFlag<"ZI">;
 def _SLASH_Zi : CLFlag<"Zi">;
index a1193f547336c0ca5699bae08dee6443b7f2b166..83e6aedf453b58c7e0727d78f0fef14b7dbd3408 100644 (file)
@@ -3719,11 +3719,10 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const {
       llvm_unreachable("Unexpected option ID.");
   }
 
-  if (!Args.hasArg(options::OPT__SLASH_Za)) {
-    // This provides POSIX compatibility (maps 'open' to '_open'),
-    // which most users want.
-    CmdArgs.push_back("--dependent-lib=oldnames");
-  }
+  // This provides POSIX compatibility (maps 'open' to '_open'), which most
+  // users want.  The /Za flag to cl.exe turns this off, but it's not
+  // implemented in clang.
+  CmdArgs.push_back("--dependent-lib=oldnames");
 }
 
 void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
diff --git a/test/Driver/cl-Za.c b/test/Driver/cl-Za.c
deleted file mode 100644 (file)
index b1cb0b7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Don't attempt slash switches on msys bash.
-// REQUIRES: shell-preserves-root
-
-// Note: %s must be preceded by --, otherwise it may be interpreted as a
-// command-line option, e.g. on Mac where %s is commonly under /Users.
-
-// RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
-// DEFAULT: "--dependent-lib=oldnames"
-
-// RUN: %clang_cl /Za -### -- %s 2>&1 | FileCheck -check-prefix=Za %s
-// Za-NOT: "--dependent-lib=oldnames"