diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 060bc7669b72a5..015578a6d688e1 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -171,6 +171,22 @@ AST Dumping Potentially Breaking Changes "qualType": "foo" } +Clang Frontend Potentially Breaking Changes +------------------------------------------- +- Target OS macros extension + A new Clang extension (see :ref:`here `) is enabled for + Darwin (Apple platform) targets. Clang now defines ``TARGET_OS_*`` macros for + these targets, which could break existing code bases with improper checks for + the ``TARGET_OS_`` macros. For example, existing checks might fail to include + the ``TargetConditionals.h`` header from Apple SDKs and therefore leaving the + macros undefined and guarded code unexercised. + + Affected code should be checked to see if it's still intended for the specific + target and fixed accordingly. + + The extension can be turned off by the option ``-fno-define-target-os-macros`` + as a workaround. + What's New in Clang |release|? ============================== Some of the major new features and improvements to Clang are listed @@ -344,6 +360,14 @@ New Compiler Flags (like other functions) with respect to visibility attributes, pragmas and options (e.g ``--fvisibility=``). +.. _target_os_detail: +* ``-fdefine-target-os-macros`` and its complement + ``-fno-define-target-os-macros``. Enables or disables the Clang extension to + provide built-in definitions of a list of ``TARGET_OS_*`` macros based on the + target triple. + + The extension is enabled by default for Darwin (Apple platform) targets. + Deprecated Compiler Flags -------------------------