fix(jolt): disable IPO so libJolt.a links on Linux/GCC (#44)#47
Merged
proggeramlug merged 1 commit intomainfrom May 1, 2026
Merged
fix(jolt): disable IPO so libJolt.a links on Linux/GCC (#44)#47proggeramlug merged 1 commit intomainfrom
proggeramlug merged 1 commit intomainfrom
Conversation
Rust's link step routes through rust-lld on Linux, which doesn't load gcc's lto-wrapper plugin. With INTERPROCEDURAL_OPTIMIZATION=ON, libJolt.a archive members are GIMPLE bitcode and rust-lld leaves their implementations unresolved — JPH::Free, BodyManager locks, vtables, etc all come up undefined. macOS Apple Clang handles LTO archives transparently which is why macOS was unaffected. Also fix the Jolt option name typo: PROFILE_ENABLED is not a Jolt CMake option (Jolt expects PROFILER_IN_DEBUG_AND_RELEASE / PROFILER_IN_DISTRIBUTION), so the comment claiming "no profile" was a no-op and Jolt was actually being built with the profiler enabled. Same for DEBUG_RENDERER_IN_DISTRIBUTION, now explicitly forced off.
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.
Summary
INTERPROCEDURAL_OPTIMIZATIONinbloom_jolt's CMake config. Rust's link step on Linux routes through rust-lld which doesn't load gcc's lto-wrapper plugin, solibJolt.a's GIMPLE-bytecode archive members leaveJPH::Free, BodyManager locks, vtables, etc unresolved at the final link.PROFILE_ENABLEDis not a real Jolt CMake variable. Jolt's actual options arePROFILER_IN_DEBUG_AND_RELEASEandPROFILER_IN_DISTRIBUTION. The previous setting was a no-op, so Jolt was being built with the profiler ON despite the "no profile" intent. Same cleanup applied toDEBUG_RENDERER_IN_DISTRIBUTION.Why Linux only
macOS Apple Clang produces LTO archives that Apple's linker handles transparently — that's why local macOS builds and the macOS CI job pass. The failure mode is specific to GCC's GIMPLE bitcode + a non-GCC-driven linker, which is exactly what the Rust toolchain does on Ubuntu.
Closes #44.
Test plan
cargo test --releaseinnative/shared/still green on macOS (66 passed locally)shared-tests (ubuntu-22.04)job goes greenshared-tests (windows-latest)job stays greenbuild-linuxjob goes green