Skip to content

build: support LLVM 23 - #2159

Open
lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-llvm23
Open

build: support LLVM 23#2159
lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-llvm23

Conversation

@lgritz

@lgritz lgritz commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator
  • 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

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>
@lgritz

lgritz commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

The sanitizer failure is entirely separate and I'm addressing it separately.

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.

1 participant