llvm-wasm: ship relocatable install trees via cmake --install.#70
Merged
vgvassilev merged 1 commit intoMay 12, 2026
Merged
Conversation
93f12c5 to
27457bf
Compare
Recipe used to publish a trimmed source+build tree directly, with
build-time absolute paths baked into LLVMConfig.cmake (the
LLVMExports.cmake `include()` referenced
/home/runner/work/ci-workflows/ci-workflows/_recipe_work/llvm-
project/{native_build,build}/...). Anything but the worker that
ran the publish step saw `cmake Error: include could not find
requested file` -- CppInterOp's consumer extract to $WS/install/
failed at the host cppinterop-tblgen bootstrap.
Both build stages now run `cmake --install` via
LLVM_DISTRIBUTION_COMPONENTS. The host bootstrap installs
tblgens + cmake-exports + llvm-headers + every transitively-built
LLVM*/clang* lib at OUT_DIR/install/native_build/; the wasm
cross-build installs clang-headers + clang-cmake-exports +
clang-resource-headers + clangInterpreter + cmake-exports +
llvm-headers + every wasm-built LLVM*/clang* lib at
OUT_DIR/install/build/. cmake --install rewrites
LLVMTargets-release.cmake to use `${_IMPORT_PREFIX}`/
`${CMAKE_CURRENT_LIST_DIR}` relative paths, so consumers see
working find_package(LLVM/Clang) regardless of extract path.
LLVM_BUILD_TOOLS=OFF / CLANG_BUILD_TOOLS=OFF on the wasm
configure skip the host binaries; the wasm DIST set drops them
(`llvm-tblgen`, `clang-tblgen`, `llvm-config`, `clang`) to avoid
`ninja install-X` failing at file-not-found. The native DIST is
similarly tightened -- the host bootstrap doesn't need `clang` or
`clangInterpreter`, so neither component is asked for. The
source-tree trim is gone: the install trees are self-contained,
so we no longer ship llvm/{include,cmake} + clang/{include,cmake}
from the build source. Consumer cmake contract in recipe.yaml is
unchanged.
27457bf to
d8f0368
Compare
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.
Recipe used to publish a trimmed source+build tree directly, with build-time absolute paths baked into LLVMConfig.cmake (the LLVMExports.cmake
include()referenced/home/runner/work/ci-workflows/ci-workflows/_recipe_work/llvm- project/{native_build,build}/...). Anything but the worker that ran the publish step saw
cmake Error: include could not find requested file-- CppInterOp's consumer extract to $WS/install/ failed at the host cppinterop-tblgen bootstrap.Both build stages now run
cmake --installviaLLVM_DISTRIBUTION_COMPONENTS. The host bootstrap installs tblgens + cmake-exports + llvm-headers + every transitively-built LLVM*/clang* lib at OUT_DIR/install/native_build/; the wasm cross-build installs clang-headers + clang-cmake-exports + clang-resource-headers + clangInterpreter + cmake-exports + llvm-headers + every wasm-built LLVM*/clang* lib at OUT_DIR/install/build/. cmake --install rewrites
LLVMTargets-release.cmake to use
${_IMPORT_PREFIX}/${CMAKE_CURRENT_LIST_DIR}relative paths, so consumers see working find_package(LLVM/Clang) regardless of extract path.LLVM_BUILD_TOOLS=OFF / CLANG_BUILD_TOOLS=OFF on the wasm configure skip the host binaries; the wasm DIST set drops them (
llvm-tblgen,clang-tblgen,llvm-config,clang) to avoidninja install-Xfailing at file-not-found. The native DIST is similarly tightened -- the host bootstrap doesn't needclangorclangInterpreter, so neither component is asked for. The source-tree trim is gone: the install trees are self-contained, so we no longer ship llvm/{include,cmake} + clang/{include,cmake} from the build source. Consumer cmake contract in recipe.yaml is unchanged.