If you specify something different with -mmacosx-version-min, it will be silently ignored. I would like to report that as an error but I believe that Xcode will sometimes do that, and we don't want to break builds from Xcode.
On Jul 19, 2012, at 9:06 AM, jahanian <[email protected]> wrote: > Hi Bob, > > How this patch would impact if user ran into the known issue previously and > passed down, say, 10.7 to fix the problem? > Would appearance of two deployment target be handled properly by cc1? > > - Fariborz > > On Jul 18, 2012, at 6:35 PM, Bob Wilson wrote: > >> Author: bwilson >> Date: Wed Jul 18 20:35:55 2012 >> New Revision: 160484 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=160484&view=rev >> Log: >> Force the OS X version to 10.6 for old-style simulator builds. >> >> The hack of recognizing a -D__IPHONE_OS_VERSION_MIN_REQUIRED option >> in place of -mios-simulator-version-min leaves the Darwin version >> unspecified. It can be set separately with -mmacosx-version-min (which >> makes no sense) or inferred to match the host version (which is unpredictable >> and usually wrong). This really needs to get cleaned up, but in the >> meantime, force the OS X version to 10.6 so that the behavior is sane for >> the iOS simulator. Thanks for Argyrios for the patch. >> <rdar://problem/11858187> >> >> Modified: >> cfe/trunk/lib/Driver/ToolChains.cpp >> cfe/trunk/test/Driver/ios-simulator-arcruntime.c >> >> Modified: cfe/trunk/lib/Driver/ToolChains.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=160484&r1=160483&r2=160484&view=diff >> ============================================================================== >> --- cfe/trunk/lib/Driver/ToolChains.cpp (original) >> +++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Jul 18 20:35:55 2012 >> @@ -461,6 +461,11 @@ >> Major < 10 && Minor < 100 && Micro < 100) { >> TargetSimulatorVersionFromDefines = VersionTuple(Major, Minor, >> Micro); >> } >> + // When using the define to indicate the simulator, we force >> + // 10.6 macosx target. >> + const Option *O = >> Opts.getOption(options::OPT_mmacosx_version_min_EQ); >> + OSXVersion = Args.MakeJoinedArg(0, O, "10.6"); >> + Args.append(OSXVersion); >> break; >> } >> } >> >> Modified: cfe/trunk/test/Driver/ios-simulator-arcruntime.c >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/ios-simulator-arcruntime.c?rev=160484&r1=160483&r2=160484&view=diff >> ============================================================================== >> --- cfe/trunk/test/Driver/ios-simulator-arcruntime.c (original) >> +++ cfe/trunk/test/Driver/ios-simulator-arcruntime.c Wed Jul 18 20:35:55 2012 >> @@ -1,6 +1,8 @@ >> // RUN: %clang -### -x objective-c -target i386-apple-darwin10 -arch i386 >> -mmacosx-version-min=10.6 -D__IPHONE_OS_VERSION_MIN_REQUIRED=40201 >> -fobjc-arc -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s >> -// RUN: %clang -### -x objective-c -target i386-apple-darwin10 -arch i386 >> -mmacosx-version-min=10.6 -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 >> -fobjc-arc -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s >> +// RUN: %clang -### -x objective-c -target i386-apple-darwin10 -arch i386 >> -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -fobjc-arc -fsyntax-only %s 2>&1 | >> FileCheck -check-prefix=CHECK-OPTIONS2 %s >> // >> >> +// CHECK-OPTIONS1: i386-apple-macosx10.6.0 >> // CHECK-OPTIONS1: -fobjc-runtime=ios-4.2.1 >> +// CHECK-OPTIONS2: i386-apple-macosx10.6.0 >> // CHECK-OPTIONS2: -fobjc-runtime=ios-5.0.0 >> >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
