Skip to content

Add Clang system config action (15/24) - #23190

Merged
MikeMcQuaid merged 1 commit into
mainfrom
install-step-15-clang-system-config
Jul 29, 2026
Merged

Add Clang system config action (15/24)#23190
MikeMcQuaid merged 1 commit into
mainfrom
install-step-15-clang-system-config

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Four LLVM and Clang formulae share macOS target configuration generation
for the active SDK and kernel versions.

  • skip non-macOS installs and generated native configurations
  • select the current or versioned Command Line Tools SDK
  • emit compatible arm64, aarch64 and x86_64 target files

AI disclosure: using OpenAI Codex 5.6 Sol max with local review and
testing.

@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-14-glibc-runtime branch from 4620ad0 to 2fbea75 Compare July 20, 2026 07:22
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-15-clang-system-config branch from 2aefaca to 83511f2 Compare July 20, 2026 07:22
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-14-glibc-runtime branch from 2fbea75 to 46ec0ad Compare July 21, 2026 07:14
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-15-clang-system-config branch from 83511f2 to 2850010 Compare July 21, 2026 07:14
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-14-glibc-runtime branch 2 times, most recently from d5ef087 to d39b823 Compare July 26, 2026 17:13
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-15-clang-system-config branch from 2850010 to 36c7752 Compare July 26, 2026 18:30
@MikeMcQuaid
MikeMcQuaid requested a review from Copilot July 26, 2026 18:30

Copilot AI 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.

Pull request overview

This PR introduces a new configure_clang_system install-step action to generate macOS Clang target configuration (.cfg) files under etc/clang, and wires it into the InstallSteps DSL, RuboCop allowlists, tests, and documentation.

Changes:

  • Add Utils::Clang.write_system_config_files to emit per-target .cfg files pointing at the CLT SDK sysroot.
  • Add a new InstallSteps DSL action (configure_clang_system) plus Runner dispatch and a corresponding formula action implementation.
  • Update RuboCop allowlists, add RSpec coverage, and document the new action in the Formula Cookbook.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Library/Homebrew/utils/clang.rb New utility to write Clang target config files for multiple architectures and system/version pairs.
Library/Homebrew/test/utils/clang_spec.rb Adds a unit spec for the new config file generator.
Library/Homebrew/test/rubocops/install_steps_spec.rb Updates RuboCop expectations to allow configure_clang_system in steps blocks.
Library/Homebrew/test/install_steps_spec.rb Adds a dispatch test ensuring the new DSL step routes to the Runner method.
Library/Homebrew/rubocops/shared/install_steps_helper.rb Adds configure_clang_system to the list of allowed formula action step methods.
Library/Homebrew/install_steps/formula_actions.rb Implements run_configure_clang_system to generate configs on macOS when needed.
Library/Homebrew/install_steps.rb Adds the DSL method and Runner case dispatch for configure_clang_system.
docs/Formula-Cookbook.md Documents the new action in the cookbook’s “formula action steps” list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/install_steps/formula_actions.rb
Comment thread Library/Homebrew/test/utils/clang_spec.rb Outdated
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-15-clang-system-config branch from 36c7752 to acff6a4 Compare July 26, 2026 19:15
Four LLVM and Clang formulae share macOS target configuration generation
for the active SDK and kernel versions.

- skip non-macOS installs and generated native configurations
- select the current or versioned Command Line Tools SDK
- emit compatible arm64, aarch64 and x86_64 target files
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-15-clang-system-config branch from acff6a4 to b312752 Compare July 27, 2026 07:10
@MikeMcQuaid
MikeMcQuaid marked this pull request as ready for review July 29, 2026 13:28
Base automatically changed from install-step-14-glibc-runtime to main July 29, 2026 16:58
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main with commit 182da7a Jul 29, 2026
43 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the install-step-15-clang-system-config branch July 29, 2026 17:31
dduugg added a commit that referenced this pull request Jul 30, 2026
Main added the `configure_glibc_runtime` and `configure_clang_system`
install-steps DSL methods (#23201, #23190). They are formula-facing DSL with
no in-repo caller, like their siblings, so mark them `@api internal` to keep
brew deadcode idempotent.

Claude-Session: https://claude.ai/code/session_011BgWRBydtdkvt8ocqH4nj9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants