Skip to content

Commit 799e067

Browse files
committed
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
1 parent c3a9a9b commit 799e067

36 files changed

+1009
-524
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ jobs:
6565
git config --global user.name "User"
6666
./y.rs prepare
6767
68+
- name: Build without unstable features
69+
env:
70+
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
71+
# This is the config rust-lang/rust uses for builds
72+
run: ./y.rs build --no-unstable-features
73+
6874
- name: Build
6975
run: ./y.rs build --sysroot none
7076

@@ -152,11 +158,12 @@ jobs:
152158
153159
./y.exe build
154160
155-
#- name: Package prebuilt cg_clif
156-
# run: tar cvfJ cg_clif.tar.xz build
161+
- name: Package prebuilt cg_clif
162+
# don't use compression as xzip isn't supported by tar on windows and bzip2 hangs
163+
run: tar cvf cg_clif.tar build
157164

158-
#- name: Upload prebuilt cg_clif
159-
# uses: actions/upload-artifact@v2
160-
# with:
161-
# name: cg_clif-${{ runner.os }}
162-
# path: cg_clif.tar.xz
165+
- name: Upload prebuilt cg_clif
166+
uses: actions/upload-artifact@v2
167+
with:
168+
name: cg_clif-${{ runner.os }}
169+
path: cg_clif.tar
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Test nightly Cranelift
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '1 17 * * *' # At 01:17 UTC every day.
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 60
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Cache cargo installed crates
17+
uses: actions/cache@v2
18+
with:
19+
path: ~/.cargo/bin
20+
key: ubuntu-latest-cargo-installed-crates
21+
22+
- name: Prepare dependencies
23+
run: |
24+
git config --global user.email "user@example.com"
25+
git config --global user.name "User"
26+
./y.rs prepare
27+
28+
- name: Patch Cranelift
29+
run: |
30+
sed -i 's/cranelift-codegen = { version = "\w*.\w*.\w*", features = \["unwind", "all-arch"\] }/cranelift-codegen = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git", features = ["unwind", "all-arch"] }/' Cargo.toml
31+
sed -i 's/cranelift-frontend = "\w*.\w*.\w*"/cranelift-frontend = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
32+
sed -i 's/cranelift-module = "\w*.\w*.\w*"/cranelift-module = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
33+
sed -i 's/cranelift-native = "\w*.\w*.\w*"/cranelift-native = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
34+
sed -i 's/cranelift-jit = { version = "\w*.\w*.\w*", optional = true }/cranelift-jit = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git", optional = true }/' Cargo.toml
35+
sed -i 's/cranelift-object = "\w*.\w*.\w*"/cranelift-object = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
36+
37+
sed -i 's/gimli = { version = "0.25.0", default-features = false, features = \["write"\]}/gimli = { version = "0.26.1", default-features = false, features = ["write"] }/' Cargo.toml
38+
39+
cat Cargo.toml
40+
41+
- name: Build without unstable features
42+
# This is the config rust-lang/rust uses for builds
43+
run: ./y.rs build --no-unstable-features
44+
45+
- name: Build
46+
run: ./y.rs build --sysroot none
47+
- name: Test
48+
run: |
49+
# Enable backtraces for easier debugging
50+
export RUST_BACKTRACE=1
51+
52+
# Reduce amount of benchmark runs as they are slow
53+
export COMPILE_RUNS=2
54+
export RUN_RUNS=2
55+
56+
# Enable extra checks
57+
export CG_CLIF_ENABLE_VERIFIER=1
58+
59+
./test.sh

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"rust-analyzer.assist.importEnforceGranularity": true,
66
"rust-analyzer.assist.importPrefix": "crate",
77
"rust-analyzer.cargo.runBuildScripts": true,
8+
"rust-analyzer.cargo.features": ["unstable-features"]
89
"rust-analyzer.linkedProjects": [
910
"./Cargo.toml",
1011
//"./build_sysroot/sysroot_src/src/libstd/Cargo.toml",

Cargo.lock

Lines changed: 48 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,30 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", features = ["unwind", "all-arch"] }
12-
cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git" }
13-
cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git" }
14-
cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git" }
15-
cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", optional = true }
16-
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git" }
11+
cranelift-codegen = { version = "0.78.0", features = ["unwind", "all-arch"] }
12+
cranelift-frontend = "0.78.0"
13+
cranelift-module = "0.78.0"
14+
cranelift-native = "0.78.0"
15+
cranelift-jit = { version = "0.78.0", optional = true }
16+
cranelift-object = "0.78.0"
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.25.0", default-features = false, features = ["write"]}
19-
object = { version = "0.26.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
19+
object = { version = "0.27.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
2020

2121
ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" }
2222
indexmap = "1.0.2"
2323
libloading = { version = "0.6.0", optional = true }
2424
smallvec = "1.6.1"
2525

26+
[patch.crates-io]
2627
# Uncomment to use local checkout of cranelift
27-
#[patch."https://github.com/bytecodealliance/wasmtime.git"]
2828
#cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }
2929
#cranelift-frontend = { path = "../wasmtime/cranelift/frontend" }
3030
#cranelift-module = { path = "../wasmtime/cranelift/module" }
3131
#cranelift-native = { path = "../wasmtime/cranelift/native" }
3232
#cranelift-jit = { path = "../wasmtime/cranelift/jit" }
3333
#cranelift-object = { path = "../wasmtime/cranelift/object" }
3434

35-
#[patch.crates-io]
3635
#gimli = { path = "../" }
3736

3837
[features]

build_sysroot/Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)