build: support LLVM 23 - #2159
Open
lgritz wants to merge 1 commit into
Open
Conversation
Fix the API and linking changes that came with LLVM 23. * LLVM 23 removed <llvm/Transforms/Utils/UnifyFunctionExitNodes.h>. We included it but never used anything from it, so just drop the include. * LLVM 23 removed NoInfsFPMath, NoNaNsFPMath, and NoSignedZerosFPMath from TargetOptions, following UnsafeFPMath in LLVM 22. FP math control is now expressed with per-instruction fast-math flags in the IR. Guard both use sites with OSL_LLVM_VERSION < 230. In the JIT path the values we set all matched LLVM's own defaults, so behavior is unchanged there. * Only fall back on the individual static clang archives when libclang-cpp is not available (an LLVM built with LLVM_LINK_LLVM_DYLIB=OFF). We were linking both, which is redundant since libclang-cpp already contains those components. It also broke the build outright with Homebrew's llvm@23, whose static clang archives hold LTO bitcode members that the system linker's older libLTO cannot parse. Assisted-by: Claude Code / claude-opus-5 Signed-off-by: Larry Gritz <lg@larrygritz.com>
Collaborator
Author
|
The sanitizer failure is entirely separate and I'm addressing it separately. |
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.
LLVM 23 removed
<llvm/Transforms/Utils/UnifyFunctionExitNodes.h>. We included it but never used anything from it, so just drop the include.LLVM 23 removed NoInfsFPMath, NoNaNsFPMath, and NoSignedZerosFPMath from TargetOptions, following UnsafeFPMath in LLVM 22. FP math control is now expressed with per-instruction fast-math flags in the IR.
Only fall back on the individual static clang archives when libclang-cpp is not available (an LLVM built with LLVM_LINK_LLVM_DYLIB=OFF). We were linking both, which is redundant since libclang-cpp already contains those components.
Assisted-by: Claude Code / claude-opus-5