forked from OSchip/llvm-project
Driver/Darwin: Resolve deployment target defaulting to be more predictable;
assume we are targetting OS X unless an explicit option is given. llvm-svn: 108426
This commit is contained in:
parent
736406d0dc
commit
b2447154e0
|
@ -469,19 +469,10 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,
|
|||
iPhoneVersion = DAL->MakeJoinedArg(0, O, iPhoneOSTarget);
|
||||
DAL->append(iPhoneVersion);
|
||||
} else {
|
||||
// Otherwise, choose a default platform based on the tool chain.
|
||||
//
|
||||
// FIXME: Don't hardcode default here.
|
||||
if (getTriple().getArch() == llvm::Triple::arm ||
|
||||
getTriple().getArch() == llvm::Triple::thumb) {
|
||||
const Option *O = Opts.getOption(options::OPT_miphoneos_version_min_EQ);
|
||||
iPhoneVersion = DAL->MakeJoinedArg(0, O, "3.0");
|
||||
DAL->append(iPhoneVersion);
|
||||
} else {
|
||||
const Option *O = Opts.getOption(options::OPT_mmacosx_version_min_EQ);
|
||||
OSXVersion = DAL->MakeJoinedArg(0, O, MacosxVersionMin);
|
||||
DAL->append(OSXVersion);
|
||||
}
|
||||
// Otherwise, assume we are targeting OS X.
|
||||
const Option *O = Opts.getOption(options::OPT_mmacosx_version_min_EQ);
|
||||
OSXVersion = DAL->MakeJoinedArg(0, O, MacosxVersionMin);
|
||||
DAL->append(OSXVersion);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang -ccc-host-triple i386-apple-darwin9 -arch armv7 -flto -S -o - %s | FileCheck %s
|
||||
// RUN: %clang -ccc-host-triple i386-apple-darwin9 -miphoneos-version-min=3.0 -arch armv7 -flto -S -o - %s | FileCheck %s
|
||||
|
||||
// CHECK: @f0
|
||||
// CHECK-NOT: ssp
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -dM -E -o %t %s
|
||||
// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0
|
||||
// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1
|
||||
// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=3.0 -dM -E -o %t %s
|
||||
// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '30000' | count 1
|
||||
// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0
|
||||
// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.0 -dM -E -o %t %s
|
||||
|
|
Loading…
Reference in New Issue