Skip to content

Commit 7b3bd56

Browse files
committed
Merge commit 'dec0daa8f6d0a0e1c702f169abb6bf3eee198c67' into sync_cg_clif-2023-03-15
1 parent 2c122a8 commit 7b3bd56

Some content is hidden

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

52 files changed

+873
-792
lines changed

.github/workflows/abi-cafe.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Abi-cafe
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
abi_cafe:
8+
runs-on: ${{ matrix.os }}
9+
timeout-minutes: 60
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.env.TARGET_TRIPLE }}
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
strategy:
19+
fail-fast: true
20+
matrix:
21+
include:
22+
- os: ubuntu-latest
23+
env:
24+
TARGET_TRIPLE: x86_64-unknown-linux-gnu
25+
- os: macos-latest
26+
env:
27+
TARGET_TRIPLE: x86_64-apple-darwin
28+
- os: windows-latest
29+
env:
30+
TARGET_TRIPLE: x86_64-pc-windows-msvc
31+
- os: windows-latest
32+
env:
33+
TARGET_TRIPLE: x86_64-pc-windows-gnu
34+
35+
steps:
36+
- uses: actions/checkout@v3
37+
38+
- name: Cache cargo target dir
39+
uses: actions/cache@v3
40+
with:
41+
path: build/cg_clif
42+
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
43+
44+
- name: Set MinGW as the default toolchain
45+
if: matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
46+
run: rustup set default-host x86_64-pc-windows-gnu
47+
48+
- name: Use sparse cargo registry
49+
run: |
50+
cat >> ~/.cargo/config.toml <<EOF
51+
[unstable]
52+
sparse-registry = true
53+
EOF
54+
55+
- name: Prepare dependencies
56+
run: ./y.rs prepare
57+
58+
- name: Build
59+
run: ./y.rs build --sysroot none
60+
61+
- name: Test abi-cafe
62+
env:
63+
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
64+
run: ./y.rs abi-cafe

.github/workflows/main.yml

+1-58
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
rustfmt --check build_system/mod.rs
2323
2424
25-
build:
25+
test:
2626
runs-on: ${{ matrix.os }}
2727
timeout-minutes: 60
2828

@@ -114,63 +114,6 @@ jobs:
114114
run: ./y.rs test
115115

116116

117-
abi_cafe:
118-
runs-on: ${{ matrix.os }}
119-
timeout-minutes: 60
120-
121-
defaults:
122-
run:
123-
shell: bash
124-
125-
strategy:
126-
fail-fast: true
127-
matrix:
128-
include:
129-
- os: ubuntu-latest
130-
env:
131-
TARGET_TRIPLE: x86_64-unknown-linux-gnu
132-
- os: macos-latest
133-
env:
134-
TARGET_TRIPLE: x86_64-apple-darwin
135-
- os: windows-latest
136-
env:
137-
TARGET_TRIPLE: x86_64-pc-windows-msvc
138-
- os: windows-latest
139-
env:
140-
TARGET_TRIPLE: x86_64-pc-windows-gnu
141-
142-
steps:
143-
- uses: actions/checkout@v3
144-
145-
- name: Cache cargo target dir
146-
uses: actions/cache@v3
147-
with:
148-
path: build/cg_clif
149-
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
150-
151-
- name: Set MinGW as the default toolchain
152-
if: matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
153-
run: rustup set default-host x86_64-pc-windows-gnu
154-
155-
- name: Use sparse cargo registry
156-
run: |
157-
cat >> ~/.cargo/config.toml <<EOF
158-
[unstable]
159-
sparse-registry = true
160-
EOF
161-
162-
- name: Prepare dependencies
163-
run: ./y.rs prepare
164-
165-
- name: Build
166-
run: ./y.rs build --sysroot none
167-
168-
- name: Test abi-cafe
169-
env:
170-
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
171-
run: ./y.rs abi-cafe
172-
173-
174117
bench:
175118
runs-on: ubuntu-latest
176119
timeout-minutes: 60

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ perf.data.old
1414
/dist
1515
/rust
1616
/download
17+
/git-fixed-subtree.sh

Cargo.lock

+25-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+6-8
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ crate-type = ["dylib"]
1515

1616
[dependencies]
1717
# These have to be in sync with each other
18-
cranelift-codegen = { version = "0.92", features = ["unwind", "all-arch"] }
19-
cranelift-frontend = { version = "0.92" }
20-
cranelift-module = { version = "0.92" }
21-
# NOTE vendored as src/cranelift_native.rs
22-
# FIXME revert back to the external crate with Cranelift 0.93
23-
#cranelift-native = { version = "0.92" }
24-
cranelift-jit = { version = "0.92", optional = true }
25-
cranelift-object = { version = "0.92" }
18+
cranelift-codegen = { version = "0.93", features = ["unwind", "all-arch"] }
19+
cranelift-frontend = { version = "0.93" }
20+
cranelift-module = { version = "0.93" }
21+
cranelift-native = { version = "0.93" }
22+
cranelift-jit = { version = "0.93", optional = true }
23+
cranelift-object = { version = "0.93" }
2624
target-lexicon = "0.12.0"
2725
gimli = { version = "0.26.0", default-features = false, features = ["write"]}
2826
object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

build_sysroot/Cargo.lock

+6-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build_sysroot/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ alloc = { path = "./sysroot_src/library/alloc" }
88
std = { path = "./sysroot_src/library/std", features = ["panic_unwind", "backtrace"] }
99
test = { path = "./sysroot_src/library/test" }
1010

11-
compiler_builtins = { version = "0.1.39", default-features = false, features = ["no-asm"] }
11+
compiler_builtins = { version = "0.1.87", default-features = false, features = ["no-asm"] }
1212

1313
[patch.crates-io]
1414
rustc-std-workspace-core = { path = "./sysroot_src/library/rustc-std-workspace-core" }

build_system/build_sysroot.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ pub(crate) fn build_sysroot(
4646
let wrapper_name = wrapper_base_name.replace("____", wrapper);
4747

4848
let mut build_cargo_wrapper_cmd = Command::new(&bootstrap_host_compiler.rustc);
49+
let wrapper_path = DIST_DIR.to_path(dirs).join(&wrapper_name);
4950
build_cargo_wrapper_cmd
5051
.env("TOOLCHAIN_NAME", toolchain_name.clone())
5152
.arg(RelPath::SCRIPTS.to_path(dirs).join(&format!("{wrapper}.rs")))
5253
.arg("-o")
53-
.arg(DIST_DIR.to_path(dirs).join(wrapper_name))
54+
.arg(&wrapper_path)
5455
.arg("-Cstrip=debuginfo");
5556
spawn_and_wait(build_cargo_wrapper_cmd);
57+
try_hard_link(wrapper_path, BIN_DIR.to_path(dirs).join(wrapper_name));
5658
}
5759

5860
let host = build_sysroot_for_triple(
@@ -247,6 +249,7 @@ fn build_clif_sysroot_for_triple(
247249
if channel == "release" {
248250
build_cmd.arg("--release");
249251
}
252+
build_cmd.arg("--locked");
250253
build_cmd.env("__CARGO_DEFAULT_LIB_METADATA", "cg_clif");
251254
if compiler.triple.contains("apple") {
252255
build_cmd.env("CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO", "packed");

0 commit comments

Comments
 (0)