Repository navigation
Do not probe /bin/clang for the resource dir with a build-tree Clang - #1155
Open
conrade-ctc wants to merge 1 commit into
Open
conrade-ctc wants to merge 1 commit into
conrade-ctc wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1155 +/- ##
=======================================
Coverage 88.86% 88.86%
=======================================
Files 24 24
Lines 7014 7014
=======================================
Hits 6233 6233
Misses 781 781 🚀 New features to boost your workflow:
|
A build-tree ClangConfig does not set CLANG_INSTALL_PREFIX, so the configure-time probe ran /bin/clang. On a host with a system clang, the library then used that clang's resource dir, also for another major version. Skip the probe without a prefix; the runtime finds the dir through LLVM_BINARY_DIR. Co-developed-with-the-help-of: Claude Code (Opus 5.5, human in the loop)
conrade-ctc
force-pushed
the
fix/resource-dir-build-tree
branch
from
November 30, 2026 22:08
10f1f68 to
339c4a6
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A build-tree
ClangConfig.cmakedoes not setCLANG_INSTALL_PREFIX. Thus the configure-time probe from #1119 runs/bin/clang -print-resource-dir. On a host with a system clang, the library then gets that clang's resource dir, also when its major version is different. For example, a library for LLVM 22 used/usr/lib/clang/21, andInterpreter_DetectResourceDirfailed.This skips the probe when
CLANG_INSTALL_PREFIXis empty, as the prefix fallback from #1143 already does. A build-tree build then compiles in no resource dir, and at runtimeMakeResourcesPath()finds it throughLLVM_BINARY_DIR.Type of change
Testing
Locally (Linux, an LLVM 22 build tree, a system clang 21 in
/usr/bin), the configure step now shows no detected dir, and all unit tests pass,Interpreter_DetectResourceDirincluded. Before the change, that test failed in the in-process and out-of-process modes.Checklist
🤖 Done with the help of Claude Code (Opus 5.5, human in the loop)