@@ -96,6 +96,22 @@ Clang Python Bindings Potentially Breaking Changes
96
96
but after the end of the ``SourceRange ``, ``SourceRange.__contains__ ``
97
97
used to incorrectly return ``True ``. (#GH22617), (#GH52827)
98
98
99
+ Clang Frontend Potentially Breaking Changes
100
+ -------------------------------------------
101
+ - Target OS macros extension
102
+ A new Clang extension (see :ref: `here <target_os_detail >`) is enabled for
103
+ Darwin (Apple platform) targets. Clang now defines ``TARGET_OS_* `` macros for
104
+ these targets, which could break existing code bases with improper checks for
105
+ the ``TARGET_OS_ `` macros. For example, existing checks might fail to include
106
+ the ``TargetConditionals.h `` header from Apple SDKs and therefore leaving the
107
+ macros undefined and guarded code unexercised.
108
+
109
+ Affected code should be checked to see if it's still intended for the specific
110
+ target and fixed accordingly.
111
+
112
+ The extension can be turned off by the option ``-fno-define-target-os-macros ``
113
+ as a workaround.
114
+
99
115
What's New in Clang |release |?
100
116
==============================
101
117
Some of the major new features and improvements to Clang are listed
@@ -196,6 +212,15 @@ New Compiler Flags
196
212
existing ``-fno-c++-static-destructors `` flag) skips all static
197
213
destructors registration.
198
214
215
+ .. _target_os_detail :
216
+
217
+ * ``-fdefine-target-os-macros `` and its complement
218
+ ``-fno-define-target-os-macros ``. Enables or disables the Clang extension to
219
+ provide built-in definitions of a list of ``TARGET_OS_* `` macros based on the
220
+ target triple.
221
+
222
+ The extension is enabled by default for Darwin (Apple platform) targets.
223
+
199
224
Deprecated Compiler Flags
200
225
-------------------------
201
226
0 commit comments