From: Iain Sandoe Date: Fri, 3 Jan 2020 08:42:04 +0000 Subject: [PATCH] [tapi] Implement zippered support. Recent SDKs have introduced a platform type 'zippered'. This is understood to allow the same specfication to be used for MacOS and iOSMac. This is an implementation of support estimated as needed. It is sufficient, at present, to use Darwin18 and 19 SDKs. --- include/tapi/Core/Platform.h | 1 + include/tapi/LinkerInterfaceFile.h | 3 +++ lib/Core/Platform.cpp | 4 ++++ lib/Core/YAML.cpp | 1 + tools/libtapi/LinkerInterfaceFile.cpp | 2 ++ 5 files changed, 11 insertions(+) diff --git tapi/include/tapi/Core/Platform.h tapi/include/tapi/Core/Platform.h index afe19df..ff39fd3 100644 --- tapi/include/tapi/Core/Platform.h +++ tapi/include/tapi/Core/Platform.h @@ -34,6 +34,7 @@ enum class Platform : uint8_t { watchOS, watchOSSimulator, bridgeOS, + zippered, }; Platform mapToSim(Platform platform, bool wantSim); diff --git tapi/include/tapi/LinkerInterfaceFile.h tapi/include/tapi/LinkerInterfaceFile.h index a18d9be..987cc4b 100644 --- tapi/include/tapi/LinkerInterfaceFile.h +++ tapi/include/tapi/LinkerInterfaceFile.h @@ -64,6 +64,9 @@ enum class Platform : unsigned { /// \since 1.2 bridgeOS = 5, + /// \brief zippered + /// \since 2.0 + zippered = 6, }; /// diff --git tapi/lib/Core/Platform.cpp tapi/lib/Core/Platform.cpp index 29e1ab4..af62f3d 100644 --- tapi/lib/Core/Platform.cpp +++ tapi/lib/Core/Platform.cpp @@ -93,6 +93,8 @@ StringRef getPlatformName(Platform platform) { return "tvOSSimulator"; case Platform::bridgeOS: return "bridgeOS"; + case Platform::zippered: + return "zippered"; } } @@ -116,6 +118,8 @@ std::string getOSAndEnvironmentName(Platform platform, std::string version) { return "tvos" + version + "-simulator"; case Platform::bridgeOS: return "bridgeos" + version; + case Platform::zippered: + return "zippered" + version; } } diff --git tapi/lib/Core/YAML.cpp tapi/lib/Core/YAML.cpp index 3aa286e..823a542 100644 --- tapi/lib/Core/YAML.cpp +++ tapi/lib/Core/YAML.cpp @@ -55,6 +55,7 @@ void ScalarEnumerationTraits::enumeration(IO &io, io.enumCase(platform, "tvos", Platform::tvOS); io.enumCase(platform, "tvos", Platform::tvOSSimulator); io.enumCase(platform, "bridgeos", Platform::bridgeOS); + io.enumCase(platform, "zippered", Platform::zippered); } using TAPI_INTERNAL::Architecture; diff --git tapi/tools/libtapi/LinkerInterfaceFile.cpp tapi/tools/libtapi/LinkerInterfaceFile.cpp index b678999..c0f1ff0 100644 --- tapi/tools/libtapi/LinkerInterfaceFile.cpp +++ tapi/tools/libtapi/LinkerInterfaceFile.cpp @@ -298,6 +298,8 @@ static tapi::Platform mapPlatform(tapi::internal::Platform platform) { return Platform::tvOS; case tapi::internal::Platform::bridgeOS: return Platform::bridgeOS; + case tapi::internal::Platform::zippered: + return Platform::zippered; } }