aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorZixu Wang <9819235+zixu-w@users.noreply.github.com>2024-02-16 05:36:18 -0800
committerGitHub <noreply@github.com>2024-02-16 05:36:18 -0800
commitddc2a5ff4e149d07fcda735c1d860be95006fe2a (patch)
treefc4f9d1b955c6b5abb6263dadb01cbbf79d4b50c /clang
parent0a44c3792a6ff799df5f100670d7e19d1bc49f03 (diff)
downloadllvm-ddc2a5ff4e149d07fcda735c1d860be95006fe2a.zip
llvm-ddc2a5ff4e149d07fcda735c1d860be95006fe2a.tar.gz
llvm-ddc2a5ff4e149d07fcda735c1d860be95006fe2a.tar.bz2
[18.x][Docs] Add release note about Clang-defined target OS macros (#80044)
The change is included in the 18.x release. Move the release note to the release branch and reformat. (cherry picked from commit b40d5b1b08564d23d5e0769892ebbc32447b2987)
Diffstat (limited to 'clang')
-rw-r--r--clang/docs/ReleaseNotes.rst25
1 files changed, 25 insertions, 0 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 9edbfbf..93a67e7 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -171,6 +171,22 @@ AST Dumping Potentially Breaking Changes
"qualType": "foo"
}
+Clang Frontend Potentially Breaking Changes
+-------------------------------------------
+- Target OS macros extension
+ A new Clang extension (see :ref:`here <target_os_detail>`) is enabled for
+ Darwin (Apple platform) targets. Clang now defines ``TARGET_OS_*`` macros for
+ these targets, which could break existing code bases with improper checks for
+ the ``TARGET_OS_`` macros. For example, existing checks might fail to include
+ the ``TargetConditionals.h`` header from Apple SDKs and therefore leaving the
+ macros undefined and guarded code unexercised.
+
+ Affected code should be checked to see if it's still intended for the specific
+ target and fixed accordingly.
+
+ The extension can be turned off by the option ``-fno-define-target-os-macros``
+ as a workaround.
+
What's New in Clang |release|?
==============================
Some of the major new features and improvements to Clang are listed
@@ -351,6 +367,15 @@ New Compiler Flags
* Full register names can be used when printing assembly via ``-mregnames``.
This option now matches the one used by GCC.
+.. _target_os_detail:
+
+* ``-fdefine-target-os-macros`` and its complement
+ ``-fno-define-target-os-macros``. Enables or disables the Clang extension to
+ provide built-in definitions of a list of ``TARGET_OS_*`` macros based on the
+ target triple.
+
+ The extension is enabled by default for Darwin (Apple platform) targets.
+
Deprecated Compiler Flags
-------------------------