@@ -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
@@ -351,6 +367,15 @@ New Compiler Flags
351367* Full register names can be used when printing assembly via ``-mregnames ``.
352368 This option now matches the one used by GCC.
353369
370+ .. _target_os_detail :
371+
372+ * ``-fdefine-target-os-macros `` and its complement
373+ ``-fno-define-target-os-macros ``. Enables or disables the Clang extension to
374+ provide built-in definitions of a list of ``TARGET_OS_* `` macros based on the
375+ target triple.
376+
377+ The extension is enabled by default for Darwin (Apple platform) targets.
378+
354379Deprecated Compiler Flags
355380-------------------------
356381
0 commit comments