[PATCH] clang-cl: Implement support for the /Fo option
Reid Kleckner
rnk at google.com
Tue Aug 6 14:04:05 PDT 2013
================
Comment at: include/clang/Driver/CLCompatOptions.td:87
@@ -86,1 +86,3 @@
+def _SLASH_Fo : CLJoinedOrSeparate<"Fo">,
+ HelpText<"Specifiy object file or directory">, MetaVarName<"<filename>">;
def _SLASH_Tc : CLJoinedOrSeparate<"Tc">, HelpText<"Specify a C source file">,
----------------
We should document that a trailing slash is what implies a directory, hopefully with less than 70-ish characters.
================
Comment at: include/clang/Driver/CLCompatOptions.td:86
@@ -85,1 +85,3 @@
+def _SLASH_Fo : CLJoinedOrSeparate<"Fo">,
+ HelpText<"Specifiy object file or directory">, MetaVarName<"<filename>">;
----------------
I don't think we should support the separate form of /Fo, since cl.exe doesn't either.
================
Comment at: lib/Driver/Driver.cpp:1620
@@ +1619,3 @@
+ Filename.append(".");
+ // FIXME: For clang-cl, we want .obj rather than .o for object files.
+ Filename.append(types::getTypeTempSuffix(types::TY_Object));
----------------
We're already dominated by a check for /Fo, which implies clang-cl mode, so I'd just hardcode this to append(".obj") and get this right on the first commit. No need to go back and change the test.
http://llvm-reviews.chandlerc.com/D1302
More information about the cfe-commits
mailing list