def err_drv_invalid_int_value : Error<"invalid integral value '%1' in '%0'">;
def err_drv_invalid_remap_file : Error<
"invalid option '%0' not of the form <from-file>;<to-file>">;
-def err_drv_conflicting_deployment_targets : Error<
- "conflicting deployment targets, both MACOSX_DEPLOYMENT_TARGET '%0' and IPHONEOS_DEPLOYMENT_TARGET '%1' are present in environment">;
def warn_drv_input_file_unused : Warning<
"%0: '%1' input unused when '%2' is present">;
"ignoring invalid -ftabstop value '%0', using default value %1">;
def warn_drv_missing_resource_library : Warning<
"missing resource library '%0', link may fail">;
+def warn_drv_conflicting_deployment_targets : Warning<
+ "conflicting deployment targets, both MACOSX_DEPLOYMENT_TARGET '%0' and IPHONEOS_DEPLOYMENT_TARGET '%1' are present in environment">;
}
if (iPhoneOSTarget && iPhoneOSTarget[0] == '\0')
iPhoneOSTarget = 0;
- if (OSXTarget) {
- // Diagnose conflicting deployment targets.
- if (iPhoneOSTarget)
- getDriver().Diag(clang::diag::err_drv_conflicting_deployment_targets)
- << OSXTarget << iPhoneOSTarget;
+ // Diagnose conflicting deployment targets, and choose default platform
+ // based on the tool chain.
+ //
+ // FIXME: Don't hardcode default here.
+ if (OSXTarget && iPhoneOSTarget) {
+ // FIXME: We should see if we can get away with warning or erroring on
+ // this. Perhaps put under -pedantic?
+ if (getTriple().getArch() == llvm::Triple::arm ||
+ getTriple().getArch() == llvm::Triple::thumb)
+ OSXVersion = 0;
+ else
+ iPhoneVersion = 0;
+ }
+ if (OSXTarget) {
const Option *O = Opts.getOption(options::OPT_mmacosx_version_min_EQ);
OSXVersion = DAL->MakeJoinedArg(0, O, OSXTarget);
DAL->append(OSXVersion);