Skip to content

llvm-wasm: ship relocatable install trees via cmake --install.#70

Merged
vgvassilev merged 1 commit into
compiler-research:mainfrom
vgvassilev:llvm-wasm-relocatable-install
May 12, 2026
Merged

llvm-wasm: ship relocatable install trees via cmake --install.#70
vgvassilev merged 1 commit into
compiler-research:mainfrom
vgvassilev:llvm-wasm-relocatable-install

Conversation

@vgvassilev
Copy link
Copy Markdown
Contributor

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.

@vgvassilev vgvassilev force-pushed the llvm-wasm-relocatable-install branch 4 times, most recently from 93f12c5 to 27457bf Compare May 12, 2026 14:51
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.
@vgvassilev vgvassilev force-pushed the llvm-wasm-relocatable-install branch from 27457bf to d8f0368 Compare May 12, 2026 18:30
@vgvassilev vgvassilev merged commit aa8c544 into compiler-research:main May 12, 2026
33 checks passed
@vgvassilev vgvassilev deleted the llvm-wasm-relocatable-install branch May 12, 2026 18:40
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