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

Cranelift ISLE build script: make manifest check optional, to avoid dependencies where needed. #3616

Closed
wants to merge 1 commit into from
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ jobs:
submodules: true
- name: Install Rust
run: rustup update stable && rustup default stable
- run: cd cranelift/codegen && cargo build --features "all-arch completely-skip-isle-for-ci-deterministic-check"
# Run without `check-isle` feature (see note in `cranelift/codegen/build.rs` for why).
- run: cd cranelift/codegen && cargo build --no-default-features --features "std unwind all-arch"
- run: ci/ensure_deterministic_build.sh

# Perform release builds of `wasmtime` and `libwasmtime.so`. Builds on
Expand Down
18 changes: 15 additions & 3 deletions cranelift/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ criterion = "0.3"
cranelift-codegen-meta = { path = "meta", version = "0.79.0" }
cranelift-isle = { path = "../isle/isle", version = "=0.79.0", optional = true }
miette = { version = "3", features = ["fancy"], optional = true }
sha2 = "0.9.8"
sha2 = { version = "0.9.8", optional = true }

[features]
default = ["std", "unwind"]
default = ["std", "unwind", "check-isle"]

# The "std" feature enables use of libstd. The "core" feature enables use
# of some minimal std-like replacement libraries. At least one of these two
Expand All @@ -58,6 +58,13 @@ testing_hooks = []
# This enables unwind info generation functionality.
unwind = ["gimli"]

# The "check-isle" feature checks that ISLE-generated source is
# up-to-date during build, according to a manifest of file hashes
# created the last time the source was regenerated. Use the
# "rebuild-isle" feature (which depends on this feature) to
# additionally regenerate the source.
check-isle = ["sha2"]

# ISA targets for which we should build.
# If no ISA targets are explicitly enabled, the ISA target for the host machine is enabled.
x86 = []
Expand Down Expand Up @@ -91,7 +98,12 @@ regalloc-snapshot = ["bincode", "regalloc/enable-serde"]
souper-harvest = ["souper-ir", "souper-ir/stringify"]

# Recompile ISLE DSL source files into their generated Rust code.
rebuild-isle = ["cranelift-isle", "miette", "cranelift-codegen-meta/rebuild-isle"]
rebuild-isle = [
"check-isle",
"cranelift-isle",
"miette",
"cranelift-codegen-meta/rebuild-isle",
]

# A hack to skip the ISLE-rebuild logic when testing for determinism
# with the "Meta deterministic check" CI job.
Expand Down
Loading