@@ -1592,6 +1592,12 @@ succeeds but Clang emits a warning specifying that the function is deprecated.
1592
1592
Finally, if Clang is instructed to compile code for macOS 10.7, the call
1593
1593
fails because ``f()`` is no longer available.
1594
1594
1595
+ Clang is instructed to compile code for a minimum deployment version using
1596
+ the ``-target`` or ``-mtargetos`` command line arguments. For example,
1597
+ macOS 10.7 would be specified as ``-target x86_64-apple-macos10.7`` or
1598
+ ``-mtargetos=macos10.7``. Variants like Mac Catalyst are specified as
1599
+ ``-target arm64-apple-ios15.0-macabi`` or ``-mtargetos=ios15.0-macabi``
1600
+
1595
1601
The availability attribute is a comma-separated list starting with the
1596
1602
platform name and then including clauses specifying important milestones in the
1597
1603
declaration's lifetime (in any order) along with additional information. Those
@@ -1636,41 +1642,61 @@ the implicitly inferred availability attributes. If no availability attribute
1636
1642
specifies availability for the current target platform, the availability
1637
1643
attributes are ignored. Supported platforms are:
1638
1644
1639
- ``ios``
1640
- Apple's iOS operating system. The minimum deployment target is specified
1641
- as part of the ``-target *arch*-apple-ios*version*`` command line argument.
1642
- Alternatively, it can be specified by the ``-mtargetos=ios*version*``
1643
- command-line argument.
1645
+ ``iOS``
1646
+ ``macOS``
1647
+ ``tvOS``
1648
+ ``watchOS``
1649
+ ``iOSApplicationExtension``
1650
+ ``macOSApplicationExtension``
1651
+ ``tvOSApplicationExtension``
1652
+ ``watchOSApplicationExtension``
1653
+ ``macCatalyst``
1654
+ ``macCatalystApplicationExtension``
1655
+ ``visionOS``
1656
+ ``visionOSApplicationExtension``
1657
+ ``driverkit``
1658
+ ``swift``
1659
+ ``android``
1660
+ ``fuchsia``
1661
+ ``ohos``
1662
+ ``zos``
1663
+ ``ShaderModel``
1644
1664
1645
- ``macos``
1646
- Apple's macOS operating system. The minimum deployment target is specified
1647
- as part of the ``-target *arch*-apple-macos*version*`` command line argument.
1648
- Alternatively, it can be specified by the ``-mtargetos=macos*version*``
1649
- command-line argument. ``macosx`` is supported for
1650
- backward-compatibility reasons, but it is deprecated.
1665
+ Some platforms have alias names:
1651
1666
1667
+ ``ios``
1668
+ ``macos``
1669
+ ``macosx (deprecated)``
1652
1670
``tvos``
1653
- Apple's tvOS operating system. The minimum deployment target is specified
1654
- as part of the ``-target *arch*-apple-tvos*version*`` command line argument.
1655
- Alternatively, it can be specified by the ``-mtargetos=tvos*version*``
1656
- command-line argument.
1657
-
1658
1671
``watchos``
1659
- Apple's watchOS operating system. The minimum deployment target is specified
1660
- as part of the ``-target *arch*-apple-watchos*version*`` command line argument.
1661
- Alternatively, it can be specified by the ``-mtargetos=watchos*version*``
1662
- command-line argument.
1663
-
1672
+ ``ios_app_extension``
1673
+ ``macos_app_extension``
1674
+ ``macosx_app_extension (deprecated)``
1675
+ ``tvos_app_extension``
1676
+ ``watchos_app_extension``
1677
+ ``maccatalyst``
1678
+ ``maccatalyst_app_extension``
1664
1679
``visionos``
1665
- Apple's visionOS operating system. The minimum deployment target is specified
1666
- as part of the ``-target *arch*-apple-visionos*version*`` command line argument.
1667
- Alternatively, it can be specified by the ``-mtargetos=visionos*version*``
1668
- command-line argument.
1669
-
1670
- ``driverkit``
1671
- Apple's DriverKit userspace kernel extensions. The minimum deployment target
1672
- is specified as part of the ``-target *arch*-apple-driverkit*version*``
1673
- command line argument.
1680
+ ``visionos_app_extension``
1681
+ ``shadermodel``
1682
+
1683
+ Supported environment names for the ShaderModel platform:
1684
+
1685
+ ``pixel``
1686
+ ``vertex``
1687
+ ``geometry``
1688
+ ``hull``
1689
+ ``domain``
1690
+ ``compute``
1691
+ ``raygeneration``
1692
+ ``intersection``
1693
+ ``anyhit``
1694
+ ``closesthit``
1695
+ ``miss``
1696
+ ``callable``
1697
+ ``mesh``
1698
+ ``amplification``
1699
+ ``library``
1674
1700
1675
1701
A declaration can typically be used even when deploying back to a platform
1676
1702
version prior to when the declaration was introduced. When this happens, the
0 commit comments