@@ -49,6 +49,24 @@ ABI Changes in This Version
49
49
AST Dumping Potentially Breaking Changes
50
50
----------------------------------------
51
51
52
+ Clang Frontend Potentially Breaking Changes
53
+ -------------------------------------------
54
+
55
+ Target OS macros extension
56
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
57
+ A new Clang extension (see :ref: `here <target_os_detail >`) is enabled for
58
+ Darwin (Apple platform) targets. Clang now defines ``TARGET_OS_* `` macros for
59
+ these targets, which could break existing code bases with improper checks for
60
+ the ``TARGET_OS_ `` macros. For example, existing checks might fail to include
61
+ the ``TargetConditionals.h `` header from Apple SDKs and therefore leaving the
62
+ macros undefined and guarded code unexercised.
63
+
64
+ Affected code should be checked to see if it's still intended for the specific
65
+ target and fixed accordingly.
66
+
67
+ The extension can be turned off by the option ``-fno-define-target-os-macros ``
68
+ as a workaround.
69
+
52
70
What's New in Clang |release |?
53
71
==============================
54
72
Some of the major new features and improvements to Clang are listed
@@ -97,6 +115,17 @@ Non-comprehensive list of changes in this release
97
115
New Compiler Flags
98
116
------------------
99
117
118
+ .. _target_os_detail :
119
+
120
+ Target OS macros extension
121
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
122
+ A pair of new flags ``-fdefine-target-os-macros `` and
123
+ ``-fno-define-target-os-macros `` has been added to Clang to enable/disable the
124
+ extension to provide built-in definitions of a list of ``TARGET_OS_* `` macros
125
+ based on the target triple.
126
+
127
+ The extension is enabled by default for Darwin (Apple platform) targets.
128
+
100
129
Deprecated Compiler Flags
101
130
-------------------------
102
131
0 commit comments