@@ -168,6 +168,22 @@ Clang Python Bindings Potentially Breaking Changes
168
168
The previous name was incorrect, it was a duplicate of variant 28.
169
169
- Refactored enum implementation, switching to the standard library `Enum ` type.
170
170
171
+ Clang Frontend Potentially Breaking Changes
172
+ -------------------------------------------
173
+ - Target OS macros extension
174
+ A new Clang extension (see :ref: `here <target_os_detail >`) is enabled for
175
+ Darwin (Apple platform) targets. Clang now defines ``TARGET_OS_* `` macros for
176
+ these targets, which could break existing code bases with improper checks for
177
+ the ``TARGET_OS_ `` macros. For example, existing checks might fail to include
178
+ the ``TargetConditionals.h `` header from Apple SDKs and therefore leaving the
179
+ macros undefined and guarded code unexercised.
180
+
181
+ Affected code should be checked to see if it's still intended for the specific
182
+ target and fixed accordingly.
183
+
184
+ The extension can be turned off by the option ``-fno-define-target-os-macros ``
185
+ as a workaround.
186
+
171
187
What's New in Clang |release |?
172
188
==============================
173
189
Some of the major new features and improvements to Clang are listed
@@ -501,6 +517,15 @@ New Compiler Flags
501
517
- ``-fpointer-tbaa `` enables emission of distinct type-based alias
502
518
analysis tags for incompatible pointers.
503
519
520
+ .. _target_os_detail :
521
+
522
+ * ``-fdefine-target-os-macros `` and its complement
523
+ ``-fno-define-target-os-macros ``. Enables or disables the Clang extension to
524
+ provide built-in definitions of a list of ``TARGET_OS_* `` macros based on the
525
+ target triple.
526
+
527
+ The extension is enabled by default for Darwin (Apple platform) targets.
528
+
504
529
Deprecated Compiler Flags
505
530
-------------------------
506
531
0 commit comments