-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update LLVM to 18.1.2 and add wasm-component-ld (#402)
* Update LLVM to 18.1.2 and add wasm-component-ld This commit has two intertwined changes within it. First the LLVM submodule is updated to the 18.1.2 release branch. This alone would cause CI and tests to fail due to differing behavior for the `wasm32-wasip2` target. To fix these test failures the `wasm-component-ld` tool is added to the build. This tool is a Rust-written tool and installed via `cargo install` as part of the build at a pinned version written in the `Makefile`. This linker, used for components, is then used for the `wasm32-wasip2` target. Tests and CI are then updated to skip the need to have `wasm-tools` or the adapter for WASI when making components since that's now the job of `wasm-component-ld`. This then necessitated some changes to tests too. * Add back accidentally deleted CI * Inherit tools on PATH on Windows * Add Rust to docker build * Put rust in a different location in docker * Try to fix permissions * Review comments * Revert changes to test outputs
- Loading branch information
1 parent
a7b2182
commit 392035c
Showing
6 changed files
with
30 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ default: build | |
@echo "Use -fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION)" | ||
|
||
check: | ||
TARGETS="$(TARGETS)" tests/run.sh "$(BUILD_PREFIX)" "$(RUNTIME)" "$(ADAPTER)" "$(WASM_TOOLS)" | ||
TARGETS="$(TARGETS)" tests/run.sh "$(BUILD_PREFIX)" "$(RUNTIME)" | ||
|
||
clean: | ||
rm -rf build $(DESTDIR) | ||
|
@@ -122,6 +122,14 @@ build/llvm.BUILT: | |
llvm-config | ||
touch build/llvm.BUILT | ||
|
||
# Build the `wasm-component-ld` linker from source via `cargo install`. This is | ||
# used for the `wasm32-wasip2` target natively by Clang. Note that `--root` | ||
# passed to `cargo install` will place it in the output directory automatically. | ||
build/wasm-component-ld.BUILT: build/llvm.BUILT | ||
cargo install [email protected] --root $(BUILD_PREFIX) | ||
touch build/wasm-component-ld.BUILT | ||
|
||
|
||
# Flags for running `make` in wasi-libc | ||
# $(1): the target that's being built | ||
WASI_LIBC_MAKEFLAGS = \ | ||
|
@@ -132,7 +140,7 @@ WASI_LIBC_MAKEFLAGS = \ | |
SYSROOT=$(BUILD_PREFIX)/share/wasi-sysroot \ | ||
TARGET_TRIPLE=$(1) | ||
|
||
build/wasi-libc.BUILT: build/compiler-rt.BUILT | ||
build/wasi-libc.BUILT: build/compiler-rt.BUILT build/wasm-component-ld.BUILT | ||
$(MAKE) $(call WASI_LIBC_MAKEFLAGS,wasm32-wasi) default libc_so | ||
$(MAKE) $(call WASI_LIBC_MAKEFLAGS,wasm32-wasip1) default libc_so | ||
$(MAKE) $(call WASI_LIBC_MAKEFLAGS,wasm32-wasip2) WASI_SNAPSHOT=p2 default libc_so | ||
|
Submodule llvm-project
updated
149 files
This file contains 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
This file contains 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