Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix abi crates depending on compilers #541

Merged
merged 7 commits into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ install:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

build_script:
- git submodule update --init
- cargo build --release --verbose
# Now we build wapm
- git submodule init
- git submodule update
# Cache wapm cli target in dir above to prevent breaking git submodule on windows
- if not exist wapm-cli-target mkdir wapm-cli-target
- move wapm-cli-target wapm-cli
Expand Down
20 changes: 20 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
<<: *run_with_build_env_vars
steps:
- checkout
- run:
name: "Pull Submodules"
command: |
git submodule update --init
- restore_cache:
keys:
- v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
Expand Down Expand Up @@ -57,6 +61,10 @@ jobs:
<<: *run_with_build_env_vars
steps:
- checkout
- run:
name: "Pull Submodules"
command: |
git submodule update --init
- restore_cache:
keys:
- v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }}
Expand Down Expand Up @@ -87,6 +95,10 @@ jobs:
<<: *run_with_build_env_vars
steps:
- checkout
- run:
name: "Pull Submodules"
command: |
git submodule update --init
- restore_cache:
keys:
- v8-test-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
Expand Down Expand Up @@ -118,6 +130,10 @@ jobs:
xcode: "9.0"
steps:
- checkout
- run:
name: "Pull Submodules"
command: |
git submodule update --init
- restore_cache:
keys:
- v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
Expand Down Expand Up @@ -172,6 +188,10 @@ jobs:
- image: circleci/rust:latest
steps:
- checkout
- run:
name: "Pull Submodules"
command: |
git submodule update --init
- run:
name: "Pull dependencies"
command: |
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "wapm-cli"]
path = wapm-cli
url = https://github.com/wasmerio/wapm-cli.git
[submodule "lib/clif-backend/cranelift"]
path = lib/clif-backend/cranelift
url = https://github.com/wasmerio/cranelift
branch = wasmer
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All PRs to the Wasmer repository must add to this file.
Blocks of changes will separated by version increments.

## **[Unreleased]**
- [#541](https://github.com/wasmerio/wasmer/pull/541) Fix dependency graph by making separate test crates; ABI implementations should not depend on compilers. Add Cranelift fork as git submodule of clif-backend
- [#537](https://github.com/wasmerio/wasmer/pull/537) Add hidden flag (`--cache-key`) to use prehashed key into the compiled wasm cache and change compiler backend-specific caching to use directories
- [#536](https://github.com/wasmerio/wasmer/pull/536) ~Update cache to use compiler backend name in cache key~

Expand Down
88 changes: 56 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ wasmer-llvm-backend = { path = "lib/llvm-backend", optional = true }
wasmer-wasi = { path = "lib/wasi", optional = true }
wasmer-kernel-loader = { path = "lib/kernel-loader", optional = true }
wasmer-dev-utils = { path = "lib/dev-utils", optional = true }
wasmer-wasi-tests = { path = "lib/wasi-tests", optional = true }
wasmer-emscripten-tests = { path = "lib/emscripten-tests", optional = true }

[workspace]
members = [
Expand All @@ -53,6 +55,8 @@ members = [
"lib/kernel-loader",
"lib/kernel-net",
"lib/dev-utils",
"lib/wasi-tests",
"lib/emscripten-tests",
"examples/plugin-for-example"
]

Expand Down
30 changes: 18 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ generate-spectests:
WASMER_RUNTIME_GENERATE_SPECTESTS=1 cargo build -p wasmer-runtime-core --release

generate-emtests:
WASM_EMSCRIPTEN_GENERATE_EMTESTS=1 cargo build -p wasmer-emscripten --release
WASM_EMSCRIPTEN_GENERATE_EMTESTS=1 cargo build -p wasmer-emscripten-tests --release

generate-wasitests:
WASM_WASI_GENERATE_WASITESTS=1 cargo build -p wasmer-wasi --release
WASM_WASI_GENERATE_WASITESTS=1 cargo build -p wasmer-wasi-tests --release

generate: generate-spectests generate-emtests generate-wasitests

Expand All @@ -28,15 +28,18 @@ spectests: spectests-singlepass spectests-cranelift spectests-llvm

# Emscripten tests
emtests-singlepass:
cargo test --manifest-path lib/emscripten/Cargo.toml --release --features singlepass -- --test-threads=1
cargo test --manifest-path lib/emscripten-tests/Cargo.toml --release --features singlepass -- --test-threads=1

emtests-cranelift:
cargo test --manifest-path lib/emscripten/Cargo.toml --release --features clif -- --test-threads=1
cargo test --manifest-path lib/emscripten-tests/Cargo.toml --release --features clif -- --test-threads=1

emtests-llvm:
cargo test --manifest-path lib/emscripten/Cargo.toml --release --features llvm -- --test-threads=1
cargo test --manifest-path lib/emscripten-tests/Cargo.toml --release --features llvm -- --test-threads=1

emtests: emtests-singlepass emtests-cranelift emtests-llvm
emtests-unit:
cargo test --manifest-path lib/emscripten/Cargo.toml --release

emtests: emtests-unit emtests-singlepass emtests-cranelift emtests-llvm


# Middleware tests
Expand All @@ -54,15 +57,18 @@ middleware: middleware-singlepass middleware-cranelift middleware-llvm

# Wasitests
wasitests-singlepass:
cargo test --manifest-path lib/wasi/Cargo.toml --release --features singlepass -- --test-threads=1
cargo test --manifest-path lib/wasi-tests/Cargo.toml --release --features singlepass -- --test-threads=1

wasitests-cranelift:
cargo test --manifest-path lib/wasi/Cargo.toml --release --features clif -- --test-threads=1
cargo test --manifest-path lib/wasi-tests/Cargo.toml --release --features clif -- --test-threads=1

wasitests-llvm:
cargo test --manifest-path lib/wasi/Cargo.toml --release --features llvm -- --test-threads=1
cargo test --manifest-path lib/wasi-tests/Cargo.toml --release --features llvm -- --test-threads=1

wasitests-unit:
cargo test --manifest-path lib/wasi/Cargo.toml --release

wasitests: wasitests-singlepass wasitests-cranelift wasitests-llvm
wasitests: wasitests-unit wasitests-singlepass wasitests-cranelift wasitests-llvm


# Backends
Expand All @@ -83,7 +89,7 @@ capi:
cargo test -p wasmer-runtime-c-api --release

test-rest: capi
cargo test --release --all --exclude wasmer-runtime-c-api --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-wasi --exclude wasmer-middleware-common --exclude wasmer-singlepass-backend --exclude wasmer-clif-backend --exclude wasmer-llvm-backend
cargo test --release --all --exclude wasmer-runtime-c-api --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-wasi --exclude wasmer-middleware-common --exclude wasmer-singlepass-backend --exclude wasmer-clif-backend --exclude wasmer-llvm-backend --exclude wasmer-wasi-tests --exclude wasmer-emscripten-tests

circleci-clean:
@if [ ! -z "${CIRCLE_JOB}" ]; then rm -f /home/circleci/project/target/debug/deps/libcranelift_wasm* && rm -f /Users/distiller/project/target/debug/deps/libcranelift_wasm*; fi;
Expand Down Expand Up @@ -147,4 +153,4 @@ publish-release:
# cargo install cargo-deps
# must install graphviz for `dot`
dep-graph:
cargo deps --optional-deps --filter wasmer-wasi wasmer-kernel-loader wasmer-dev-utils wasmer-llvm-backend wasmer-emscripten wasmer-runtime-core wasmer-runtime wasmer-middleware-common wasmer-singlepass-backend wasmer-clif-backend wasmer --manifest-path Cargo.toml | dot -Tpng > wasmer_depgraph.png
cargo deps --optional-deps --filter wasmer-wasi wasmer-wasi-tests wasmer-kernel-loader wasmer-dev-utils wasmer-llvm-backend wasmer-emscripten wasmer-emscripten-tests wasmer-runtime-core wasmer-runtime wasmer-middleware-common wasmer-singlepass-backend wasmer-clif-backend wasmer --manifest-path Cargo.toml | dot -Tpng > wasmer_depgraph.png
Loading