[llvm-branch-commits] [clang] [18.x][Docs] Add release note about Clang-defined target OS macros (PR #80044)
https://github.com/zixu-w updated https://github.com/llvm/llvm-project/pull/80044 >From f28a33baa2c1457c4e1eca8f484c59a655132f95 Mon Sep 17 00:00:00 2001 From: Zixu Wang <9819235+zix...@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:30:20 -0800 Subject: [PATCH] [Docs] Add release note about Clang-defined target OS macros (#79879) (cherry picked from commit b40d5b1b08564d23d5e0769892ebbc32447b2987) --- clang/docs/ReleaseNotes.rst | 25 + 1 file changed, 25 insertions(+) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 060bc7669b72a5..cc75ed6bdc5ea3 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 `) 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 @@ -344,6 +360,15 @@ New Compiler Flags (like other functions) with respect to visibility attributes, pragmas and options (e.g ``--fvisibility=``). +.. _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 - ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] [18.x][Docs] Add release note about Clang-defined target OS macros (PR #80044)
zixu-w wrote: > Looks like this patch caused the documentation build to fail. Fixed. Thanks for checking @tstellar ! https://github.com/llvm/llvm-project/pull/80044 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] [InstallAPI] Capture C++ Decls (PR #83953)
https://github.com/zixu-w approved this pull request. https://github.com/llvm/llvm-project/pull/83953 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] [18.x][Docs] Add release note about Clang-defined target OS macros (PR #80044)
https://github.com/zixu-w created https://github.com/llvm/llvm-project/pull/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) >From f0f63d3276307f930ee94920e5f7f3228b05dd88 Mon Sep 17 00:00:00 2001 From: Zixu Wang <9819235+zix...@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:30:20 -0800 Subject: [PATCH] [Docs] Add release note about Clang-defined target OS macros (#79879) (cherry picked from commit b40d5b1b08564d23d5e0769892ebbc32447b2987) --- clang/docs/ReleaseNotes.rst | 24 1 file changed, 24 insertions(+) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 060bc7669b72a..015578a6d688e 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 `) 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 @@ -344,6 +360,14 @@ New Compiler Flags (like other functions) with respect to visibility attributes, pragmas and options (e.g ``--fvisibility=``). +.. _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 - ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] [18.x][Docs] Add release note about Clang-defined target OS macros (PR #80044)
https://github.com/zixu-w milestoned https://github.com/llvm/llvm-project/pull/80044 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits