Skip to content

Commit 07968a0

Browse files
committed
Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29
1 parent 500bcfc commit 07968a0

Some content is hidden

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

49 files changed

+878
-493
lines changed

.github/workflows/bootstrap_rustc.yml

-44
This file was deleted.

.github/workflows/main.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ on:
77
jobs:
88
build:
99
runs-on: ${{ matrix.os }}
10+
timeout-minutes: 60
1011

1112
strategy:
1213
fail-fast: false
1314
matrix:
14-
os: [ubuntu-latest, macos-latest]
15+
include:
16+
- os: ubuntu-latest
17+
- os: macos-latest
18+
# cross-compile from Linux to Windows using mingw
19+
- os: ubuntu-latest
20+
env:
21+
TARGET_TRIPLE: x86_64-pc-windows-gnu
1522

1623
steps:
1724
- uses: actions/checkout@v2
@@ -36,13 +43,21 @@ jobs:
3643
path: target
3744
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
3845

46+
- name: Install MinGW toolchain and wine
47+
if: matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
48+
run: |
49+
sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
50+
rustup target add x86_64-pc-windows-gnu
51+
3952
- name: Prepare dependencies
4053
run: |
4154
git config --global user.email "[email protected]"
4255
git config --global user.name "User"
4356
./prepare.sh
4457
4558
- name: Test
59+
env:
60+
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
4661
run: |
4762
# Enable backtraces for easier debugging
4863
export RUST_BACKTRACE=1
@@ -51,12 +66,16 @@ jobs:
5166
export COMPILE_RUNS=2
5267
export RUN_RUNS=2
5368
69+
# Enable extra checks
70+
export CG_CLIF_ENABLE_VERIFIER=1
71+
5472
./test.sh
5573
5674
- name: Package prebuilt cg_clif
5775
run: tar cvfJ cg_clif.tar.xz build
5876

5977
- name: Upload prebuilt cg_clif
78+
if: matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
6079
uses: actions/upload-artifact@v2
6180
with:
6281
name: cg_clif-${{ runner.os }}

.github/workflows/rustc.yml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Various rustc tests
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
bootstrap_rustc:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Cache cargo installed crates
14+
uses: actions/cache@v2
15+
with:
16+
path: ~/.cargo/bin
17+
key: ${{ runner.os }}-cargo-installed-crates
18+
19+
- name: Cache cargo registry and index
20+
uses: actions/cache@v2
21+
with:
22+
path: |
23+
~/.cargo/registry
24+
~/.cargo/git
25+
key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
26+
27+
- name: Cache cargo target dir
28+
uses: actions/cache@v2
29+
with:
30+
path: target
31+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
32+
33+
- name: Prepare dependencies
34+
run: |
35+
git config --global user.email "[email protected]"
36+
git config --global user.name "User"
37+
./prepare.sh
38+
39+
- name: Test
40+
run: |
41+
# Enable backtraces for easier debugging
42+
export RUST_BACKTRACE=1
43+
44+
./scripts/test_bootstrap.sh
45+
rustc_test_suite:
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- uses: actions/checkout@v2
50+
51+
- name: Cache cargo installed crates
52+
uses: actions/cache@v2
53+
with:
54+
path: ~/.cargo/bin
55+
key: ${{ runner.os }}-cargo-installed-crates
56+
57+
- name: Cache cargo registry and index
58+
uses: actions/cache@v2
59+
with:
60+
path: |
61+
~/.cargo/registry
62+
~/.cargo/git
63+
key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
64+
65+
- name: Cache cargo target dir
66+
uses: actions/cache@v2
67+
with:
68+
path: target
69+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
70+
71+
- name: Prepare dependencies
72+
run: |
73+
git config --global user.email "[email protected]"
74+
git config --global user.name "User"
75+
./prepare.sh
76+
77+
- name: Test
78+
run: |
79+
# Enable backtraces for easier debugging
80+
export RUST_BACKTRACE=1
81+
82+
./scripts/test_rustc_tests.sh

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// source for rustc_* is not included in the rust-src component; disable the errors about this
33
"rust-analyzer.diagnostics.disabled": ["unresolved-extern-crate", "macro-error"],
44
"rust-analyzer.assist.importMergeBehavior": "last",
5-
"rust-analyzer.cargo.loadOutDirsFromCheck": true,
5+
"rust-analyzer.cargo.runBuildScripts": true,
66
"rust-analyzer.linkedProjects": [
77
"./Cargo.toml",
88
//"./build_sysroot/sysroot_src/src/libstd/Cargo.toml",

Cargo.lock

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

Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime/", branch
1616
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
1717
target-lexicon = "0.11.0"
1818
gimli = { version = "0.23.0", default-features = false, features = ["write"]}
19-
object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "write", "coff", "elf", "macho", "pe"] }
19+
object = { version = "0.23.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"
25+
memmap2 = "0.2.1"
2526

2627
# Uncomment to use local checkout of cranelift
2728
#[patch."https://github.com/bytecodealliance/wasmtime/"]
@@ -75,3 +76,6 @@ debug = false
7576
[profile.release.package.syn]
7677
opt-level = 0
7778
debug = false
79+
80+
[package.metadata.rust-analyzer]
81+
rustc_private = true

0 commit comments

Comments
 (0)