@@ -171,6 +171,22 @@ AST Dumping Potentially Breaking Changes
171171 "qualType" : " foo"
172172 }
173173
174+ Clang Frontend Potentially Breaking Changes
175+ -------------------------------------------
176+ - Target OS macros extension
177+ A new Clang extension (see :ref: `here <target_os_detail >`) is enabled for
178+ Darwin (Apple platform) targets. Clang now defines ``TARGET_OS_* `` macros for
179+ these targets, which could break existing code bases with improper checks for
180+ the ``TARGET_OS_ `` macros. For example, existing checks might fail to include
181+ the ``TargetConditionals.h `` header from Apple SDKs and therefore leaving the
182+ macros undefined and guarded code unexercised.
183+
184+ Affected code should be checked to see if it's still intended for the specific
185+ target and fixed accordingly.
186+
187+ The extension can be turned off by the option ``-fno-define-target-os-macros ``
188+ as a workaround.
189+
174190What's New in Clang |release |?
175191==============================
176192Some of the major new features and improvements to Clang are listed
@@ -344,6 +360,15 @@ New Compiler Flags
344360 (like other functions) with respect to visibility attributes, pragmas and
345361 options (e.g ``--fvisibility= ``).
346362
363+ .. _target_os_detail :
364+
365+ * ``-fdefine-target-os-macros `` and its complement
366+ ``-fno-define-target-os-macros ``. Enables or disables the Clang extension to
367+ provide built-in definitions of a list of ``TARGET_OS_* `` macros based on the
368+ target triple.
369+
370+ The extension is enabled by default for Darwin (Apple platform) targets.
371+
347372Deprecated Compiler Flags
348373-------------------------
349374
0 commit comments