Repository navigation
[LLVM] Ship clang resource headers and compiler-rt builtins; disable LZMA - #724
Merged
Merged
Conversation
…LZMA Needed by projects/orc-pgo, whose driver is built on the clang libraries and links LLVM statically into user executables: - clang-resource-headers: builtin headers (stddef.h, arm_neon.h, ...). - compiler-rt builtins only (LLVM_ENABLE_RUNTIMES=compiler-rt, every compiler-rt runtime off, non-Windows), e.g. libclang_rt.osx.a for __builtin_available. - LLVM_ENABLE_LZMA=OFF so static LLVM consumers don't link liblzma. Also fix the distribution component list: the list(APPEND ... LLVM MLIR) after the CACHE set never reached the cache (only cache entries survive a -C script), so build the full list first and cache it once.
makslevental
force-pushed
the
orc-pgo/01-distro-resource-headers
branch
from
October 9, 2026 06:13
e2b0599 to
20cd95e
Compare
This was referenced Oct 9, 2026
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.
First PR of the
orc-pgostack (runtime PGO via embedded bitcode + ORC JIT). The project's driver is built on the clang libraries and links LLVM statically into user executables. That needs a few additions to the distribution:clang-resource-headers: clang's builtin headers (lib/clang/<N>/include:stddef.h,arm_neon.h, …). Without them the driver can't compile anything that includes them.LLVM_ENABLE_RUNTIMES=compiler-rtwith every compiler-rt runtime turned off, plus thebuiltinsdistribution component. On macOS this provideslib/clang/<N>/lib/darwin/libclang_rt.osx.a. Without it the Darwin driver silently skips the library, and e.g.__builtin_availablefails to link.LLVM_ENABLE_LZMA=OFF:llvm-config --link-static --system-libscurrently reports-llzma, so anything linking LLVM statically would pick up the liblzma dylib.Also fixes the distribution component list. The
list(APPEND … LLVM MLIR)after theCACHEset never reached the cache, because only cache entries survive a-Cscript. The cached list ended atmlir-translate. The full list is now built first and cached once.LLVM,MLIRandbuiltinsare now real dependencies ofinstall-mlirdevelopment-distribution; this was checked with a fresh configure andninja -t query.Note: none of the cache values use
FORCE, so an existing build directory keeps its old cached values. Reconfigure from a fresh build directory, or deleteCMakeCache.txt.