Skip to content

include-what-you-use: revision bump (llvm 21)#246246

Merged
BrewTestBot merged 2 commits intoHomebrew:mainfrom
branchv:include-what-you-use
Sep 30, 2025
Merged

include-what-you-use: revision bump (llvm 21)#246246
BrewTestBot merged 2 commits intoHomebrew:mainfrom
branchv:include-what-you-use

Conversation

@branchv
Copy link
Member

@branchv branchv commented Sep 30, 2025

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

Test failure seen with llvm 21.1.2 in #245468

$ include-what-you-use --print-resource-dir
/opt/homebrew/Cellar/llvm/21.1.1/lib/clang/21

Fixes include-what-you-use/include-what-you-use#1825

@github-actions
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

Caution

Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Sep 30, 2025
@BrewTestBot BrewTestBot added this pull request to the merge queue Sep 30, 2025
@cho-m
Copy link
Member

cho-m commented Sep 30, 2025

We likely want to tune IWYU_RESOURCE_RELATIVE_TO and IWYU_RESOURCE_DIR to avoid recording the Cellar path to LLVM.

Haven't tested but something like:

resource_dir = Pathname(Utils.safe_popen_read(llvm.opt_bin/"clang", "-print-resource-dir").chomp)
resource_dir = resource_dir.sub(llvm.prefix.realpath, llvm.opt_prefix)
...
%W[
  -DIWYU_RESOURCE_RELATIVE_TO=iwyu
  -DIWYU_RESOURCE_DIR=#{resource_dir.relative_path_from(bin)}
]

The problem with default IWYU_RESOURCE_RELATIVE_TO=clang is it uses the realpath to Clang in IWYU_RESOURCE_BINARY_PATH which breaks on every revision/version bump.

IWYU_RESOURCE_RELATIVE_TO=iwyu calculates the path at runtime via IWYU_RESOURCE_DIR

Merged via the queue into Homebrew:main with commit 82d695f Sep 30, 2025
19 checks passed
@branchv branchv deleted the include-what-you-use branch September 30, 2025 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fatal error: 'stdarg.h' file not found when bumping llvm to 21.1.2

4 participants