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

Rollup of 9 pull requests #86966

Merged
merged 113 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
64e08e6
Add BPF target
alessandrod Nov 30, 2020
8b08cbd
Change the ice hook for cg_clif to refer to cg_clif's issue tracker
bjorn3 May 24, 2021
d6b0345
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_…
bjorn3 May 27, 2021
4e62376
Make allocator_kind a query.
cjgillot May 11, 2021
228f1c5
Drop metadata_encoding_version.
cjgillot May 29, 2021
d8d6a5a
Revert "Reduce the amount of untracked state in TyCtxt"
cjgillot Jun 1, 2021
f4eb017
Drop metadata_encoding_version.
cjgillot May 29, 2021
b10a442
Provide a default provide* implementation for CodegenBackend
bjorn3 May 29, 2021
20e9a13
Provide default MetadataLoader
bjorn3 May 29, 2021
b6f0b46
Allow printing the version of the default codegen backend if it isn't…
bjorn3 May 29, 2021
646c604
Move windows_subsystem field from CodegenResults to CrateInfo
bjorn3 May 29, 2021
dbdeafb
Move crate_name field from OngoingCodegen to CrateInfo
bjorn3 May 29, 2021
1248ff1
Add first cut of functionality for #58713: support for #[link(kind = …
ricobbe Mar 8, 2021
bc9926a
Remove unused dylib_ext variable from build.sh
bjorn3 Jun 5, 2021
d7db869
Auto merge of #79608 - alessandrod:bpf, r=nagisa
bors Jun 6, 2021
df47bce
Auto merge of #84171 - ricobbe:raw-dylib-via-llvm, r=petrochenkov
bors Jun 6, 2021
20beb55
Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift…
luqmana Jun 5, 2021
ab73115
Auto merge of #85810 - bjorn3:further_driver_cleanup, r=varkor
bors Jun 7, 2021
8224e72
Rollup merge of #86016 - luqmana:infer-linker-flavor, r=petrochenkov
JohnTitor Jun 7, 2021
dee7c7b
Sync from rust a50d72158e08e02cfc051b863017bdbd2c45b637
bjorn3 Jun 8, 2021
a6cce19
Rustup to rustc 1.54.0-nightly (e4a603270 2021-06-07)
bjorn3 Jun 8, 2021
0d68742
Ignore unsupported test
bjorn3 Jun 8, 2021
fa7545e
Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011
bors Jun 10, 2021
b7180ae
Add missing cargo clean when cross-compiling
bjorn3 Jun 10, 2021
84dd229
Include rustc and cranelift version in debuginfo
bjorn3 Jun 10, 2021
ae1bcb2
Use -Cprefer-dynamic for all crates in jit mode
bjorn3 Jun 10, 2021
4492f32
Update Cranelift and object
bjorn3 Jun 10, 2021
75eff64
Enable cross-compilation support in Cranelift
bjorn3 Jun 10, 2021
d3e123f
Refactor to make interpreter and codegen backend neutral to vtable in…
crlf0710 Jun 14, 2021
8923e42
Use the now available implementation of `IntoIterator` for arrays
LeSeulArtichaut Jun 14, 2021
432285f
Implement llvm.x86.addcarry.64 and llvm.x86.subborrow.64 (#1178)
shamatar Jun 15, 2021
9be7ca0
Auto merge of #86291 - crlf0710:trait_vtbl_refactor, r=bjorn3
bors Jun 16, 2021
2945b96
Multithreading support for lazy-jit
eggyal Apr 28, 2021
4a7068d
Ensure Instances are only jitted once
eggyal Apr 28, 2021
5c78324
Remove lack of mulithreading support from usage.md
eggyal Jun 17, 2021
b0d1f50
Sync from rust b17d9c1332693fc386f5374f0d63aae0ce5abab5
bjorn3 Jun 17, 2021
a12e23b
Rustup to rustc 1.55.0-nightly (a85f584ae 2021-06-16)
bjorn3 Jun 17, 2021
ab7f1c8
Fix miscompilation in vtable access
bjorn3 Jun 17, 2021
0ddb937
Update rust patch for compiler_builtins update
bjorn3 Jun 17, 2021
2db4e50
Rewrite build.sh in rust
bjorn3 Jun 8, 2021
fe6a289
Rewrite prepare.sh in rust
bjorn3 Jun 11, 2021
066d5f9
Rewrite prepare_sysroot_src.sh in rust
bjorn3 Jun 16, 2021
d71b125
Merge the crate_patches dir into the patches dir
bjorn3 Jun 16, 2021
ad971bb
Rewrite build_sysroot.sh in rust
bjorn3 Jun 18, 2021
0d6b3da
Allow preserving the old sysroot
bjorn3 Jun 18, 2021
e5563b5
Improve windows support
bjorn3 Jun 18, 2021
b0d7b52
[CI] Test compilation on Windows
bjorn3 Jun 18, 2021
bc67726
Update rust-analyzer import assist config
bjorn3 Jun 18, 2021
d571910
Give an error when attempting to build for MSVC
bjorn3 Jun 19, 2021
9fd8fa2
Move some things from config.sh to ext_config.sh
bjorn3 Jun 19, 2021
b497c7d
Make allocator_kind a query.
cjgillot May 11, 2021
80e9188
Rewrite cargo.sh in rust
bjorn3 Jun 20, 2021
62e49c5
Fix compiling cargo.rs on windows
bjorn3 Jun 20, 2021
03c9ecf
Remove unnecessary LD_LIBRARY_PATH parts
bjorn3 Jun 20, 2021
b33a3ec
Merge pull request #1180 from bjorn3/rust_build_system
bjorn3 Jun 20, 2021
089d986
Remove unused variable
bjorn3 Jun 20, 2021
e475efb
Auto merge of #85640 - bjorn3:custom_ice_hook, r=jackh726
bors Jun 25, 2021
57c6eb7
Test multithreading support in lazy-jit
bjorn3 Jun 25, 2021
0d1cede
Merge pull request #1166 from eggyal/lazy-jit-multithreaded
bjorn3 Jun 25, 2021
e0af5f7
Auto merge of #85909 - cjgillot:alloc-kind-query, r=Aaron1011
bors Jun 28, 2021
4d289db
Update other codegens to use tcx managed vtable allocations.
crlf0710 Jun 20, 2021
b186f86
Auto merge of #86475 - crlf0710:miri_vtable_refactor, r=bjorn3
bors Jun 29, 2021
3ec2b44
Sync from rust e98897e5dc9898707bf4331c43b2e76ab7e282fe
bjorn3 Jun 29, 2021
6048adc
Support allocation failures when interperting MIR
syvb Jun 12, 2021
17373a9
fix sess error
syvb Jun 29, 2021
4cbba98
Rustup to rustc 1.55.0-nightly (6d820866a 2021-06-29)
bjorn3 Jun 30, 2021
f5a1633
Reduce duplication of vtables
bjorn3 Jul 1, 2021
e0f3ad2
Disable new rustc test requiring unwinding support
bjorn3 Jul 2, 2021
ae98d5a
Don't use data object for non-primitive scalars
bjorn3 Jul 2, 2021
dd1419a
Update Cranelift and object
bjorn3 Jun 25, 2021
1bd9a13
Only test global_asm on x86_64
bjorn3 Jun 25, 2021
cda8111
Fix compilation for AArch64
bjorn3 Jun 29, 2021
e8ff364
Fix rust-analyzer setting
bjorn3 Jul 2, 2021
42f9ad5
[CI] Split build and test steps
bjorn3 Jul 2, 2021
3dc9ec2
[CI] Cross compile to aarch64-unknown-linux-gnu
bjorn3 Jul 2, 2021
4c440af
Merge pull request #1183 from bjorn3/full_aarch64_support
bjorn3 Jul 2, 2021
c692896
Recover from `&dyn mut ...` parse errors
FabianWolff Jul 2, 2021
55e0779
Check if the patched sysroot source is up to date before using it
bjorn3 Jul 2, 2021
6a31385
Misc target related improvements
bjorn3 Jul 3, 2021
751ae51
Update Cranelift
bjorn3 Jul 3, 2021
913c0bc
Make vtable_allocation always succeed
syvb Jul 3, 2021
ac730b4
Update Cranelift
bjorn3 Jul 4, 2021
83cca1b
Write better clif ir header
bjorn3 Jul 4, 2021
0d531c3
Better config parsing and allow specifying host and target triple in …
bjorn3 Jul 4, 2021
5347882
Refactor cg_clif building
bjorn3 Jul 4, 2021
38585b3
Don't overwrite LD_LIBRARY_PATH in config.sh
bjorn3 Jul 4, 2021
6b3a061
Remove LibSource
bjorn3 Jun 7, 2021
a0cdbd1
Rustfmt
bjorn3 Jul 5, 2021
fed71e3
Pass CrateInfo instead of TyCtxt to load_imported_symbols_for_jit
bjorn3 Jul 5, 2021
73d2e22
Sync from rust b09dad3eddfc46c55e45f6c1a00bab09401684b4
bjorn3 Jul 6, 2021
a151982
Add doc comment for `impl From<LayoutError> for TryReserveError`
notriddle Jul 6, 2021
65b28a9
Add ui test for command line lints with tool names
eholk Jun 25, 2021
1e0db4c
Parse tool name for command line lint options
eholk Jun 24, 2021
8b4f538
Unify lint tool and lint name checking
eholk Jul 7, 2021
0db66e5
Add self to mailmap
inquisitivecrystal Jul 7, 2021
3a31c6d
Rustup to rustc 1.55.0-nightly (885399992 2021-07-06)
bjorn3 Jul 7, 2021
d531f3d
Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_…
bjorn3 Jul 7, 2021
00b2f56
Add memchr to list of permitted cg_clif deps
bjorn3 Jul 7, 2021
04a9c10
Fix ICE when misplaced visibility cannot be properly parsed
rylev Jul 7, 2021
e5c24ba
Clean up rustdoc static files
GuillaumeGomez Jul 7, 2021
5413d2e
Fix test case
eholk Jul 7, 2021
4a83a93
Cleanup: unify lint name checking
eholk Jul 7, 2021
7677f5f
Fix typo in `ops::Drop` docs
Swordelf2 Jul 7, 2021
ace3989
Revert "Add "every" as a doc alias for "all"."
cuviper Jul 7, 2021
c2d3f5f
Rollup merge of #86639 - eholk:lint-tool, r=petrochenkov
JohnTitor Jul 8, 2021
165b520
Rollup merge of #86812 - FabianWolff:recover-dyn-mut, r=petrochenkov
JohnTitor Jul 8, 2021
a57a2e9
Rollup merge of #86917 - notriddle:notriddle/from-try-reserve-error, …
JohnTitor Jul 8, 2021
fccf0c2
Rollup merge of #86925 - inquisitivecrystal:mailmap, r=Mark-Simulacrum
JohnTitor Jul 8, 2021
89638a1
Rollup merge of #86927 - bjorn3:sync_cg_clif-2021-07-07, r=bjorn3
JohnTitor Jul 8, 2021
463301a
Rollup merge of #86932 - rylev:fix-ice-86895, r=estebank
JohnTitor Jul 8, 2021
59b4f88
Rollup merge of #86933 - GuillaumeGomez:cleanup-rustdoc-static-files,…
JohnTitor Jul 8, 2021
0f37050
Rollup merge of #86955 - Swordelf2:patch-1, r=cuviper
JohnTitor Jul 8, 2021
01474ad
Rollup merge of #86956 - cuviper:unalias-every, r=m-ou-se
JohnTitor Jul 8, 2021
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
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Heather <heather@cynede.net> <Cynede@Gentoo.org>
Heather <heather@cynede.net> <Heather@cynede.net>
Herman J. Radtke III <herman@hermanradtke.com> Herman J. Radtke III <hermanradtke@gmail.com>
Ilyong Cho <ilyoan@gmail.com>
inquisitivecrystal <22333129+inquisitivecrystal@users.noreply.github.com>
Ivan Ivaschenko <defuz.net@gmail.com>
J. J. Weber <jjweber@gmail.com>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub.bukaj@yahoo.com>
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/.cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ task:
- . $HOME/.cargo/env
- git config --global user.email "user@example.com"
- git config --global user.name "User"
- ./prepare.sh
- ./y.rs prepare
test_script:
- . $HOME/.cargo/env
- # Enable backtraces for easier debugging
Expand Down
73 changes: 72 additions & 1 deletion compiler/rustc_codegen_cranelift/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- os: ubuntu-latest
env:
TARGET_TRIPLE: x86_64-pc-windows-gnu
- os: ubuntu-latest
env:
TARGET_TRIPLE: aarch64-unknown-linux-gnu

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -49,11 +52,19 @@ jobs:
sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
rustup target add x86_64-pc-windows-gnu

- name: Install AArch64 toolchain and qemu
if: matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user

- name: Prepare dependencies
run: |
git config --global user.email "user@example.com"
git config --global user.name "User"
./prepare.sh
./y.rs prepare

- name: Build
run: ./y.rs build --sysroot none

- name: Test
env:
Expand Down Expand Up @@ -87,3 +98,63 @@ jobs:
with:
name: cg_clif-${{ runner.os }}-cross-x86_64-mingw
path: cg_clif.tar.xz

build_windows:
runs-on: windows-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v2

#- name: Cache cargo installed crates
# uses: actions/cache@v2
# with:
# path: ~/.cargo/bin
# key: ${{ runner.os }}-cargo-installed-crates

#- name: Cache cargo registry and index
# uses: actions/cache@v2
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}

#- name: Cache cargo target dir
# uses: actions/cache@v2
# with:
# path: target
# key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}

- name: Prepare dependencies
run: |
git config --global user.email "user@example.com"
git config --global user.name "User"
git config --global core.autocrlf false
rustup set default-host x86_64-pc-windows-gnu
rustc y.rs -o y.exe -g
./y.exe prepare

- name: Build
#name: Test
run: |
# Enable backtraces for easier debugging
#export RUST_BACKTRACE=1

# Reduce amount of benchmark runs as they are slow
#export COMPILE_RUNS=2
#export RUN_RUNS=2

# Enable extra checks
#export CG_CLIF_ENABLE_VERIFIER=1

./y.exe build

#- name: Package prebuilt cg_clif
# run: tar cvfJ cg_clif.tar.xz build

#- name: Upload prebuilt cg_clif
# uses: actions/upload-artifact@v2
# with:
# name: cg_clif-${{ runner.os }}
# path: cg_clif.tar.xz
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
git config --global user.email "user@example.com"
git config --global user.name "User"
./prepare.sh
./y.rs prepare

- name: Test
run: |
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
run: |
git config --global user.email "user@example.com"
git config --global user.name "User"
./prepare.sh
./y.rs prepare

- name: Test
run: |
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_codegen_cranelift/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ perf.data
perf.data.old
*.events
*.string*
/y.bin
/build
/build_sysroot/sysroot_src
/build_sysroot/compiler-builtins
/build_sysroot/rustc_version
/rust
/rand
/regex
Expand Down
21 changes: 20 additions & 1 deletion compiler/rustc_codegen_cranelift/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
// source for rustc_* is not included in the rust-src component; disable the errors about this
"rust-analyzer.diagnostics.disabled": ["unresolved-extern-crate", "unresolved-macro-call"],
"rust-analyzer.assist.importMergeBehavior": "last",
"rust-analyzer.assist.importGranularity": "module",
"rust-analyzer.assist.importEnforceGranularity": true,
"rust-analyzer.assist.importPrefix": "crate",
"rust-analyzer.cargo.runBuildScripts": true,
"rust-analyzer.linkedProjects": [
"./Cargo.toml",
Expand Down Expand Up @@ -49,6 +51,23 @@
"cfg": [],
},
]
},
{
"roots": ["./y.rs"],
"crates": [
{
"root_module": "./y.rs",
"edition": "2018",
"deps": [{ "crate": 1, "name": "std" }],
"cfg": [],
},
{
"root_module": "./build_sysroot/sysroot_src/library/std/src/lib.rs",
"edition": "2018",
"deps": [],
"cfg": [],
},
]
}
]
}
56 changes: 32 additions & 24 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-bforest"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-codegen"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"
dependencies = [
"cranelift-bforest",
"cranelift-codegen-meta",
Expand All @@ -57,27 +57,27 @@ dependencies = [

[[package]]
name = "cranelift-codegen-meta"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"
dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"

[[package]]
name = "cranelift-entity"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"

[[package]]
name = "cranelift-frontend"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -87,8 +87,8 @@ dependencies = [

[[package]]
name = "cranelift-jit"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -104,8 +104,8 @@ dependencies = [

[[package]]
name = "cranelift-module"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -115,17 +115,18 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"
dependencies = [
"cranelift-codegen",
"libc",
"target-lexicon",
]

[[package]]
name = "cranelift-object"
version = "0.74.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#76c6b83f6a21a12a11d4f890490f8acb6329a600"
version = "0.75.0"
source = "git+https://github.com/bytecodealliance/wasmtime.git?branch=main#c71ad9490e7f3e19bbcae7e28bbe50f8a0b4a5d8"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand Down Expand Up @@ -171,9 +172,9 @@ dependencies = [

[[package]]
name = "libc"
version = "0.2.86"
version = "0.2.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"

[[package]]
name = "libloading"
Expand Down Expand Up @@ -203,14 +204,21 @@ dependencies = [
"libc",
]

[[package]]
name = "memchr"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"

[[package]]
name = "object"
version = "0.24.0"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7"
dependencies = [
"crc32fast",
"indexmap",
"memchr",
]

[[package]]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", features = ["unwind"] }
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", features = ["unwind", "all-arch"] }
cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main" }
cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main" }
cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main" }
cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main", optional = true }
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "main" }
target-lexicon = "0.12.0"
gimli = { version = "0.24.0", default-features = false, features = ["write"]}
object = { version = "0.24.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
object = { version = "0.25.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" }
indexmap = "1.0.2"
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_codegen_cranelift/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ If not please open an issue.
```bash
$ git clone https://github.com/bjorn3/rustc_codegen_cranelift.git
$ cd rustc_codegen_cranelift
$ ./prepare.sh # download and patch sysroot src and install hyperfine for benchmarking
$ ./build.sh
$ ./y.rs prepare # download and patch sysroot src and install hyperfine for benchmarking
$ ./y.rs build
```

To run the test suite replace the last command with:
Expand All @@ -20,7 +20,7 @@ To run the test suite replace the last command with:
$ ./test.sh
```

This will implicitly build cg_clif too. Both `build.sh` and `test.sh` accept a `--debug` argument to
This will implicitly build cg_clif too. Both `y.rs build` and `test.sh` accept a `--debug` argument to
build in debug mode.

Alternatively you can download a pre built version from [GHA]. It is listed in the artifacts section
Expand All @@ -32,12 +32,12 @@ of workflow runs. Unfortunately due to GHA restrictions you need to be logged in

rustc_codegen_cranelift can be used as a near-drop-in replacement for `cargo build` or `cargo run` for existing projects.

Assuming `$cg_clif_dir` is the directory you cloned this repo into and you followed the instructions (`prepare.sh` and `build.sh` or `test.sh`).
Assuming `$cg_clif_dir` is the directory you cloned this repo into and you followed the instructions (`y.rs prepare` and `y.rs build` or `test.sh`).

In the directory with your project (where you can do the usual `cargo build`), run:

```bash
$ $cg_clif_dir/build/cargo.sh build
$ $cg_clif_dir/build/cargo build
```

This will build your project with rustc_codegen_cranelift instead of the usual LLVM backend.
Expand Down
Loading