-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Upgrade to LLVM Clang 16 to support C++20
features on macOS 13 and 14; Ensure LLVM Toolchain Consistency; Add macOS 15 to GitHub workflow.
#745
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes update the macOS build workflow and enhance the CMake project configuration script. The workflow now uses an updated job matrix that replaces the "runner" key with "os", adding "macos-15" and introducing a conditional step for installing LLVM Clang on "macos-13" and "macos-14". Concurrently, the build-and-run unit tests script has been modified to accept optional command-line arguments for specifying custom archiver and ranlib tools, which are then passed as extra CMake configuration parameters. Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Workflow
participant Runner as macOS Runner
Workflow->>Runner: Evaluate matrix OS (macos-13, macos-14, macos-15)
alt OS is macos-13/14
Runner->>Workflow: Install LLVM Clang 16 and set env variables
Workflow->>Runner: Execute build with LLVM flags
else OS is macos-15
Workflow->>Runner: Execute standard build process
end
sequenceDiagram
participant User as Command-line User
participant Script as Build Script
participant CMake as CMake Process
User->>Script: Execute with --ar and --ranlib arguments
Script->>Script: Parse and validate CLI options
Script->>Script: Append -DCMAKE_AR and -DCMAKE_RANLIB if provided
Script->>CMake: Invoke CMake with additional configuration flags
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (10)
🔇 Additional comments (8)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
C++20
features on macOS before version 15.
C++20
features on macOS before version 15.C++20
features on macOS 13 and 14; Ensure LLVM Toolchain Consistency; Add macOS 15 to GitHub workflow.
@coderabbitai review |
✅ Actions performedReview triggered.
|
Description
To meet the requirements of
ystdlib-cpp
, we must use Clang/AppleClang version 16 or later.On macOS 13 and 14, a good solution is to install LLVM v16 compilers. However, by default CMake only picks up the new toolchain's
llvm-ranlib
, while still using/usr/bin/ar
for AR, which creates a mismatch in tool versions. For instance, after runningbrew install llvm@16
on macOS 14:It’s essential that both AR and RANLIB originate from the same LLVM distribution, otherwise linker errors will arise.
While one could technically use
/usr/bin/ar
together with/usr/bin/ranlib
, since we're using LLVM'sclang
andclang++
, it's best to ensure consistency by usingllvm-ar
andllvm-ranlib
from the same distribution.Therefore, the code has been updated to provide all four LLVM tool overrides needed to guarantee successful compilation with a matching toolchain.
Checklist
breaking change.
Validation performed
Summary by CodeRabbit