Skip to content

Commit 9950bd1

Browse files
committed
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
1 parent 54ee5ac commit 9950bd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1045
-638
lines changed

.github/workflows/main.yml

Lines changed: 68 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ jobs:
2929
matrix:
3030
include:
3131
- os: ubuntu-latest
32+
env:
33+
TARGET_TRIPLE: x86_64-unknown-linux-gnu
3234
- os: macos-latest
35+
env:
36+
TARGET_TRIPLE: x86_64-apple-darwin
3337
# cross-compile from Linux to Windows using mingw
3438
- os: ubuntu-latest
3539
env:
@@ -112,7 +116,7 @@ jobs:
112116
if: matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
113117
uses: actions/upload-artifact@v2
114118
with:
115-
name: cg_clif-${{ runner.os }}
119+
name: cg_clif-${{ matrix.env.TARGET_TRIPLE }}
116120
path: cg_clif.tar.xz
117121

118122
- name: Upload prebuilt cg_clif (cross compile)
@@ -122,56 +126,89 @@ jobs:
122126
name: cg_clif-${{ runner.os }}-cross-x86_64-mingw
123127
path: cg_clif.tar.xz
124128

125-
build_windows:
126-
runs-on: windows-latest
129+
windows:
130+
runs-on: ${{ matrix.os }}
127131
timeout-minutes: 60
128132

133+
strategy:
134+
fail-fast: false
135+
matrix:
136+
include:
137+
# Native Windows build with MSVC
138+
- os: windows-latest
139+
env:
140+
TARGET_TRIPLE: x86_64-pc-windows-msvc
141+
# cross-compile from Windows to Windows MinGW
142+
- os: windows-latest
143+
env:
144+
TARGET_TRIPLE: x86_64-pc-windows-gnu
145+
129146
steps:
130147
- uses: actions/checkout@v3
131148

132-
#- name: Cache cargo installed crates
133-
# uses: actions/cache@v2
134-
# with:
135-
# path: ~/.cargo/bin
136-
# key: ${{ runner.os }}-cargo-installed-crates
137-
138-
#- name: Cache cargo registry and index
139-
# uses: actions/cache@v2
140-
# with:
141-
# path: |
142-
# ~/.cargo/registry
143-
# ~/.cargo/git
144-
# key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
145-
146-
#- name: Cache cargo target dir
147-
# uses: actions/cache@v2
148-
# with:
149-
# path: target
150-
# key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
149+
- name: Cache cargo installed crates
150+
uses: actions/cache@v2
151+
with:
152+
path: ~/.cargo/bin
153+
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-installed-crates
154+
155+
- name: Cache cargo registry and index
156+
uses: actions/cache@v2
157+
with:
158+
path: |
159+
~/.cargo/registry
160+
~/.cargo/git
161+
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
162+
163+
- name: Cache cargo target dir
164+
uses: actions/cache@v2
165+
with:
166+
path: target
167+
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
168+
169+
- name: Set MinGW as the default toolchain
170+
if: matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
171+
run: rustup set default-host x86_64-pc-windows-gnu
151172

152173
- name: Prepare dependencies
153174
run: |
154175
git config --global user.email "[email protected]"
155176
git config --global user.name "User"
156177
git config --global core.autocrlf false
157-
rustup set default-host x86_64-pc-windows-gnu
158178
rustc y.rs -o y.exe -g
159179
./y.exe prepare
160180
181+
- name: Build without unstable features
182+
env:
183+
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
184+
# This is the config rust-lang/rust uses for builds
185+
run: ./y.rs build --no-unstable-features
186+
161187
- name: Build
162-
#name: Test
188+
run: ./y.rs build --sysroot none
189+
190+
- name: Test
163191
run: |
164192
# Enable backtraces for easier debugging
165-
#$Env:RUST_BACKTRACE=1
193+
$Env:RUST_BACKTRACE=1
166194
167195
# Reduce amount of benchmark runs as they are slow
168-
#$Env:COMPILE_RUNS=2
169-
#$Env:RUN_RUNS=2
196+
$Env:COMPILE_RUNS=2
197+
$Env:RUN_RUNS=2
170198
171199
# Enable extra checks
172-
#$Env:CG_CLIF_ENABLE_VERIFIER=1
173-
174-
./y.exe build
200+
$Env:CG_CLIF_ENABLE_VERIFIER=1
201+
202+
# WIP Disable some tests
203+
204+
# This fails due to some weird argument handling by hyperfine, not an actual regression
205+
# more of a build system issue
206+
(Get-Content config.txt) -replace '(bench.simple-raytracer)', '# $1' | Out-File config.txt
207+
208+
# This fails with a different output than expected
209+
(Get-Content config.txt) -replace '(test.regex-shootout-regex-dna)', '# $1' | Out-File config.txt
210+
211+
./y.exe test
175212
176213
- name: Package prebuilt cg_clif
177214
# don't use compression as xzip isn't supported by tar on windows and bzip2 hangs
@@ -180,5 +217,5 @@ jobs:
180217
- name: Upload prebuilt cg_clif
181218
uses: actions/upload-artifact@v2
182219
with:
183-
name: cg_clif-${{ runner.os }}
220+
name: cg_clif-${{ matrix.env.TARGET_TRIPLE }}
184221
path: cg_clif.tar

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,4 @@ perf.data.old
1515
/build_sysroot/compiler-builtins
1616
/build_sysroot/rustc_version
1717
/rust
18-
/rand
19-
/regex
20-
/simple-raytracer
21-
/portable-simd
22-
/abi-checker
18+
/download

.vscode/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"rust-analyzer.cargo.features": ["unstable-features"],
88
"rust-analyzer.linkedProjects": [
99
"./Cargo.toml",
10-
//"./build_sysroot/sysroot_src/src/libstd/Cargo.toml",
10+
//"./build_sysroot/sysroot_src/library/std/Cargo.toml",
1111
{
1212
"roots": [
1313
"./example/mini_core.rs",
@@ -36,10 +36,10 @@
3636
]
3737
},
3838
{
39-
"roots": ["./scripts/filter_profile.rs"],
39+
"roots": ["./example/std_example.rs"],
4040
"crates": [
4141
{
42-
"root_module": "./scripts/filter_profile.rs",
42+
"root_module": "./example/std_example.rs",
4343
"edition": "2018",
4444
"deps": [{ "crate": 1, "name": "std" }],
4545
"cfg": [],

Cargo.lock

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

Cargo.toml

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

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.87.0", features = ["unwind", "all-arch"] }
12-
cranelift-frontend = "0.87.0"
13-
cranelift-module = "0.87.0"
14-
cranelift-native = "0.87.0"
15-
cranelift-jit = { version = "0.87.0", optional = true }
16-
cranelift-object = "0.87.0"
11+
cranelift-codegen = { version = "0.88.1", features = ["unwind", "all-arch"] }
12+
cranelift-frontend = "0.88.1"
13+
cranelift-module = "0.88.1"
14+
cranelift-native = "0.88.1"
15+
cranelift-jit = { version = "0.88.1", optional = true }
16+
cranelift-object = "0.88.1"
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.26.0", default-features = false, features = ["write"]}
1919
object = { version = "0.29.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.9.1"
23-
libloading = { version = "0.6.0", optional = true }
23+
libloading = { version = "0.7.3", optional = true }
2424
once_cell = "1.10.0"
2525
smallvec = "1.8.1"
2626

0 commit comments

Comments
 (0)