Merge pull request #3288 from jacob-carlborg/ios

Add support for iOS, tvOS and watchOS
This commit is contained in:
Martin Kinkelin 2020-01-28 22:55:50 +01:00 committed by GitHub
commit 97e0d978ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 20 deletions

View file

@ -811,6 +811,21 @@ void registerPredefinedTargetVersions() {
VersionCondition::addPredefinedGlobalIdent("AIX");
VersionCondition::addPredefinedGlobalIdent("Posix");
break;
case llvm::Triple::IOS:
VersionCondition::addPredefinedGlobalIdent("iOS");
VersionCondition::addPredefinedGlobalIdent("Posix");
VersionCondition::addPredefinedGlobalIdent("CppRuntime_Clang");
break;
case llvm::Triple::TvOS:
VersionCondition::addPredefinedGlobalIdent("TVOS");
VersionCondition::addPredefinedGlobalIdent("Posix");
VersionCondition::addPredefinedGlobalIdent("CppRuntime_Clang");
break;
case llvm::Triple::WatchOS:
VersionCondition::addPredefinedGlobalIdent("WatchOS");
VersionCondition::addPredefinedGlobalIdent("Posix");
VersionCondition::addPredefinedGlobalIdent("CppRuntime_Clang");
break;
default:
if (triple.getEnvironment() == llvm::Triple::Android) {
VersionCondition::addPredefinedGlobalIdent("Android");