Skip to content

[cling] Compatibility with MacOSX27.0.sdk#22625

Merged
hahnjo merged 7 commits into
root-project:masterfrom
hahnjo:mac27
Jun 17, 2026
Merged

[cling] Compatibility with MacOSX27.0.sdk#22625
hahnjo merged 7 commits into
root-project:masterfrom
hahnjo:mac27

Conversation

@hahnjo

@hahnjo hahnjo commented Jun 16, 2026

Copy link
Copy Markdown
Member

One backport in LLVM headers, two backports for float.h and one additional to avoid conflicts, not setting BuiltinHeadersInSystemModules on macOS, and resolving an additional cyclic module dependency.

frederick-vs-ja and others added 2 commits June 16, 2026 11:00
This patch renames comparators
- from `std::equal_to<llvm::rdf::RegisterRef>` to
`llvm::rdf::RegisterRefEqualTo`, and
- from `std::less<llvm::rdf::RegisterRef>` to
`llvm::rdf::RegisterRefLess`.

The original specializations don't satisfy the requirements for the
original `std` templates by being stateful and
non-default-constructible, so they make the program have UB due to C++17
[namespace.std]/2, C++20/23 [namespace.std]/5.

> A program may explicitly instantiate a class template defined in the
standard library only if the declaration
> - depends on the name of at least one program-defined type, and
> - the instantiation meets the standard library requirements for the
original template.

Backport of llvm/llvm-project@a558d65
…ssary module dependency (#137432)

float.h doesn't define anything in Apple's SDKs that the clang float.h
doesn't undefine, so all the include_next does is add an unnecessary
module dependency. Skip the include_next and completely shadow the SDK
header.

Backport of llvm/llvm-project@557ddc2
@hahnjo hahnjo requested a review from devajithvs June 16, 2026 09:45
@hahnjo hahnjo self-assigned this Jun 16, 2026
@hahnjo hahnjo added in:Cling pr:emergency🚨 This PR is fixing breakage, it's urgent and may overtake others clean build Ask CI to do non-incremental build on PR labels Jun 16, 2026

@devajithvs devajithvs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@devajithvs

Copy link
Copy Markdown
Contributor

tutorial-machine_learning-TMVA_SOFIE_ONNX-py failures are unrelated and is already failing on master.

AaronBallman and others added 5 commits June 16, 2026 15:03
These macros were brought in as part of the TS 18661-1 integration in
C23, and then renamed in WG14 N2710.

Test coverage is being added to WG14 N3364 from C2y because that paper
was fixing a bug with the way these macros are handled with unary + and
- operators, so all the existing test coverage was there, just needed to
use a header file instead of defining the macros manually.

Fixes #162830

Backport of llvm/llvm-project@0e3fdc2
…IFINITY and NAN with float.h (#164348)

In C23 mode, both float.h and math.h are required to define INIFINITY
and NAN. However, with clang modules, there needs to be a single owner
for the declarations. Let that be float.h since that's the suggested
true owner in Annex F.2.2 of ISO/IEC 9899:2024, and introduce
`__need_infinity_nan` so that math.h can pick up the compiler
definitions.

Backport of llvm/llvm-project@38473c5
It was introduced in commit c28b205 during the upgrade to LLVM 18
to fix the build on (basically) all platforms, and this remains true
on Linux. For Apple however, the newest MacOSX27.0.sdk is incomaptible
and the option must not be set.
Similar to ctype.h, this is also caused by the large std module that
wraps all submodules. Instead of removing, it seems sufficient to
mark the header as textual.
@hahnjo hahnjo marked this pull request as ready for review June 16, 2026 13:04
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 12h 46m 47s ⏱️
 3 865 tests  3 864 ✅ 0 💤 1 ❌
76 363 runs  76 361 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 63a8fdb.

♻️ This comment has been updated with latest results.

@hahnjo hahnjo closed this Jun 17, 2026
@hahnjo hahnjo reopened this Jun 17, 2026
@hahnjo hahnjo merged commit 0f5bfad into root-project:master Jun 17, 2026
76 of 117 checks passed
@hahnjo hahnjo deleted the mac27 branch June 17, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:Cling pr:emergency🚨 This PR is fixing breakage, it's urgent and may overtake others

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants