diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 8b1c59abb09f..f3db0a87c318 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -564,6 +564,12 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { } } + // If no OSX or iOS target has been specified and we're compiling for armv7, + // go ahead as assume we're targeting iOS. + if (OSXTarget.empty() && iOSTarget.empty()) + if (getDarwinArchName(Args) == "armv7") + iOSTarget = "0.0"; + // Handle conflicting deployment targets // // FIXME: Don't hardcode default here.