r187998 - Revert "clang-cl: Hook up /Za to prevent adding oldnames.lib dependency"

Reid Kleckner reid at kleckner.net
Thu Aug 8 12:33:10 PDT 2013


Author: rnk
Date: Thu Aug  8 14:33:10 2013
New Revision: 187998

URL: http://llvm.org/viewvc/llvm-project?rev=187998&view=rev
Log:
Revert "clang-cl: Hook up /Za to prevent adding oldnames.lib dependency"

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.

Removed:
    cfe/trunk/test/Driver/cl-Za.c
Modified:
    cfe/trunk/include/clang/Driver/CLCompatOptions.td
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=187998&r1=187997&r2=187998&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Thu Aug  8 14:33:10 2013
@@ -98,7 +98,6 @@ def _SLASH_TC : CLFlag<"TC">, HelpText<"
 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">;

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=187998&r1=187997&r2=187998&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Aug  8 14:33:10 2013
@@ -3719,11 +3719,10 @@ void Clang::AddClangCLArgs(const ArgList
       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,

Removed: cfe/trunk/test/Driver/cl-Za.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-Za.c?rev=187997&view=auto
==============================================================================
--- cfe/trunk/test/Driver/cl-Za.c (original)
+++ cfe/trunk/test/Driver/cl-Za.c (removed)
@@ -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"





More information about the cfe-commits mailing list