[cfe-commits] r68816 - in /cfe/trunk/lib/Driver: ToolChains.cpp Tools.cpp
Daniel Dunbar
daniel at zuster.org
Fri Apr 10 13:11:50 PDT 2009
Author: ddunbar
Date: Fri Apr 10 15:11:50 2009
New Revision: 68816
URL: http://llvm.org/viewvc/llvm-project?rev=68816&view=rev
Log:
Driver: Forward -miphoneos-version-min to clang.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=68816&r1=68815&r2=68816&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Apr 10 15:11:50 2009
@@ -140,7 +140,18 @@
// have something that works, we should reevaluate each translation
// and try to push it down into tool specific logic.
- if (!Args.hasArg(options::OPT_mmacosx_version_min_EQ, false)) {
+ Arg *OSXVersion =
+ Args.getLastArg(options::OPT_mmacosx_version_min_EQ, false);
+ Arg *iPhoneVersion =
+ Args.getLastArg(options::OPT_miphoneos_version_min_EQ, false);
+ if (OSXVersion && iPhoneVersion) {
+ getHost().getDriver().Diag(clang::diag::err_drv_argument_not_allowed_with)
+ << OSXVersion->getAsString(Args)
+ << iPhoneVersion->getAsString(Args);
+ } else if (!OSXVersion && !iPhoneVersion) {
+ // Chose the default version based on the arch.
+ //
+ // FIXME: This will need to be fixed when we merge in arm support.
const Option *O = Opts.getOption(options::OPT_mmacosx_version_min_EQ);
DAL->append(DAL->MakeJoinedArg(0, O, MacosxVersionMin.c_str()));
}
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=68816&r1=68815&r2=68816&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Apr 10 15:11:50 2009
@@ -362,6 +362,7 @@
Args.AddAllArgs(CmdArgs, options::OPT_v);
Args.AddLastArg(CmdArgs, options::OPT_P);
Args.AddLastArg(CmdArgs, options::OPT_mmacosx_version_min_EQ);
+ Args.AddLastArg(CmdArgs, options::OPT_miphoneos_version_min_EQ);
// Special case debug options to only pass -g to clang. This is
// wrong.
More information about the cfe-commits
mailing list