@@ -171,6 +171,22 @@ AST Dumping Potentially Breaking Changes
171
171
"qualType" : " foo"
172
172
}
173
173
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
+
174
190
What's New in Clang |release |?
175
191
==============================
176
192
Some of the major new features and improvements to Clang are listed
@@ -344,6 +360,14 @@ New Compiler Flags
344
360
(like other functions) with respect to visibility attributes, pragmas and
345
361
options (e.g ``--fvisibility= ``).
346
362
363
+ .. _target_os_detail :
364
+ * ``-fdefine-target-os-macros `` and its complement
365
+ ``-fno-define-target-os-macros ``. Enables or disables the Clang extension to
366
+ provide built-in definitions of a list of ``TARGET_OS_* `` macros based on the
367
+ target triple.
368
+
369
+ The extension is enabled by default for Darwin (Apple platform) targets.
370
+
347
371
Deprecated Compiler Flags
348
372
-------------------------
349
373
0 commit comments