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 10 pull requests #79507

Merged
merged 80 commits into from
Nov 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
285c7c6
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_c…
bjorn3 Nov 3, 2020
b8a9beb
Remove unnecessary -Ztrim-diagnostic-paths=no
bjorn3 Nov 3, 2020
81b673b
Rustup to rustc 1.49.0-nightly (338f939a8 2020-11-02)
bjorn3 Nov 3, 2020
a3a508a
Fix compiling with CARGO_TARGET_DIR
jyn514 Nov 4, 2020
1aaa024
Merge pull request #1108 from jyn514/cargo-target-dir
bjorn3 Nov 4, 2020
7e8b15e
Fix cranelift build
oli-obk Oct 29, 2020
0dcf78b
s/Scalar::Raw/Scalar::Int
oli-obk Nov 1, 2020
5fa1c8f
`u128` truncation and sign extension are not just interpreter related
oli-obk Nov 4, 2020
6e96e10
`u64::try_from` will now fail if `ScalarInt` isn't exactly 64 bits, t…
oli-obk Nov 4, 2020
d6a9dfa
run 'shellcheck -f diff $(fd --extension sh) | git apply'
jakobhellermann Nov 4, 2020
0f10f2a
manually fix some shellcheck warnings
jakobhellermann Nov 4, 2020
33a9044
make requested PR changes
jakobhellermann Nov 5, 2020
19931e2
Merge pull request #1109 from jakobhellermann/shellcheck
bjorn3 Nov 5, 2020
d6f457d
Fix even more URLs
GuillaumeGomez Nov 5, 2020
f7e11cb
inliner: Use substs_for_mir_body
tmiasko Nov 6, 2020
21a097f
fix shellcheck error of SC2148
sasurau4 Nov 3, 2020
07aef90
fix shellcheck error of SC2068
sasurau4 Nov 2, 2020
8a097f7
Rollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514
JohnTitor Nov 6, 2020
777c9da
Add rustup pull command
bjorn3 Nov 4, 2020
66e4f1b
Don't overwrite RUSTFLAGS for cargo.sh
bjorn3 Nov 4, 2020
9b66df4
Sync from rust dc06a36074f04c6a77b5834f2950011d49607898
bjorn3 Nov 6, 2020
509054d
Fix ICE
bjorn3 Nov 6, 2020
4da6785
Rustfmt
bjorn3 Nov 6, 2020
9e1ac29
Fix ICE (part 2)
bjorn3 Nov 6, 2020
11dd005
Sync from rust 0256d065d4901b63def6c04013da4f781d0752bb
bjorn3 Nov 7, 2020
e1d5c3c
fix(rustc_parse): ConstBlock expr span
calebcartwright Nov 7, 2020
e9c34b3
Collapse all uses of `target.options.foo` into `target.foo`
petrochenkov Nov 8, 2020
6210ee2
Set diff=rust git attribute for rust files
bjorn3 Nov 8, 2020
df45a06
Don't add .d and .rmeta files to the sysroot
bjorn3 Nov 8, 2020
cf3aa64
Better build dir layout
bjorn3 Nov 8, 2020
806538f
Rollup merge of #78674 - tmiasko:inline-substs-for-mir-body, r=oli-obk
Dylan-DPC Nov 9, 2020
1a32c54
Update Cranelift
bjorn3 Nov 9, 2020
4700926
Update dependencies
bjorn3 Nov 9, 2020
65ae469
Rollup merge of #78875 - petrochenkov:cleantarg, r=Mark-Simulacrum
jonas-schievink Nov 10, 2020
a5ec857
Changed unwrap_or to unwrap_or_else in some places.
Nicholas-Baron Nov 6, 2020
96c4542
Avoid muliplications by 1
bjorn3 Nov 12, 2020
6eaa502
Update Cranelift for SimpleJIT changes
bjorn3 Nov 12, 2020
7ab499f
use hardlinks instead of copying files
jakobhellermann Nov 12, 2020
0a4f37c
Merge pull request #1111 from jakobhellermann/hardlinks-instead-of-copy
bjorn3 Nov 12, 2020
db8fa0e
Inline codegen_mono_items and outline predefine_mono_items
bjorn3 Oct 11, 2020
4e547b9
Move some things from codegen_mono_item to trans_fn
bjorn3 Oct 11, 2020
753e6bc
Sync from rust f2a11a25378293e41cfcb00dbf67c524ffd79b39
bjorn3 Nov 13, 2020
7ec4471
Rustup to rustc 1.49.0-nightly (9722952f0 2020-11-12)
bjorn3 Nov 13, 2020
bf94b38
Rustfmt
bjorn3 Nov 13, 2020
c982c48
Use rpath to compile the cg_clif executable
bjorn3 Nov 13, 2020
ffd6fdd
Remove unnecessary paths from LD_LIBRARY_PATH
bjorn3 Nov 13, 2020
56e6380
update `cg_clif`
lcnr Oct 28, 2020
905ed3b
Resolve typedefs in HashMap gdb/lldb pretty-printers
artemmukhin Nov 20, 2020
77e90f1
Sync from rust 539402cb0b0f1639a4be14e40eaf8db61a62ae41
bjorn3 Nov 21, 2020
c3179bc
Rustup to rustc 1.50.0-nightly (593fe977a 2020-11-20)
bjorn3 Nov 21, 2020
e4cc56d
Drop support for cloudabi targets
tesuji Oct 27, 2020
e31e627
Add doc for 'as _' about '_' and its possibilities and problems
poliorcetics Nov 23, 2020
22c9623
Implement simd_reduce_{add,mul}_{,un}ordered
bjorn3 Nov 23, 2020
47ff2e0
Implement float simd comparisons
bjorn3 Nov 23, 2020
d2eeed4
Implement more simd_reduce_* intrinsics
bjorn3 Nov 23, 2020
e99f78a
Make simd_extract panic at runtime on non-const index again
bjorn3 Nov 23, 2020
41047de
Rustfmt
bjorn3 Nov 23, 2020
6b47920
Convert UNC path to local path to satisfy install script on Windows
JRF63 Nov 23, 2020
57739b5
Rename `optin_builtin_traits` to `auto_traits`
camelid Nov 23, 2020
38cc998
Fix bold code formatting in keyword docs
abdnh Nov 24, 2020
b5f6c00
Auto merge of #79336 - camelid:rename-feature-oibit-to-auto, r=oli-obk
bors Nov 25, 2020
d212ea7
Remove intermediate vectors from add_bounds
bugadani Nov 27, 2020
648cace
Use the new component dependency option of the rust-toolchain file
bjorn3 Nov 27, 2020
aef656a
Rustup to rustc 1.50.0-nightly (72da5a9d8 2020-11-26)
bjorn3 Nov 27, 2020
de4ce8c
Sync from rust c9228570668803e3e6402770d55f23a12c9ae686
bjorn3 Nov 27, 2020
5988bbd
Revert "Use the new component dependency option of the rust-toolchain…
bjorn3 Nov 27, 2020
2d39c09
Change comments on types to doc-comments
jyn514 Nov 27, 2020
477aa67
Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_…
bjorn3 Nov 27, 2020
08ec201
Expand docs on Peekable::peek_mut
lukaslueg Nov 27, 2020
1b846bf
Slightly improve code samples in E0591
camelid Nov 28, 2020
772b1a6
Rollup merge of #78086 - poliorcetics:as-placeholder, r=Mark-Simulacrum
jonas-schievink Nov 28, 2020
a732c3a
Rollup merge of #78853 - calebcartwright:fix-const-block-expr-span, r…
jonas-schievink Nov 28, 2020
93d830e
Rollup merge of #79234 - ortem:fix-hashmap-pretty-printers, r=Mark-Si…
jonas-schievink Nov 28, 2020
f4301a2
Rollup merge of #79344 - JRF63:fix_install_script_win, r=Mark-Simulacrum
jonas-schievink Nov 28, 2020
1337586
Rollup merge of #79383 - abdnh:patch-1, r=shepmaster
jonas-schievink Nov 28, 2020
fe9a02c
Rollup merge of #79460 - bugadani:simplify, r=jonas-schievink
jonas-schievink Nov 28, 2020
afc5542
Rollup merge of #79474 - jyn514:query-mode, r=Aaron1011
jonas-schievink Nov 28, 2020
dd0f953
Rollup merge of #79476 - bjorn3:sync_cg_clif-2020-11-27, r=bjorn3
jonas-schievink Nov 28, 2020
248e5ad
Rollup merge of #79478 - lukaslueg:peek_mut_docs, r=m-ou-se
jonas-schievink Nov 28, 2020
208d680
Rollup merge of #79486 - camelid:E0591-code-cleanup, r=lcnr
jonas-schievink Nov 28, 2020
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 compiler/rustc_codegen_cranelift/.gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* text=auto eol=lf
*.rs diff=rust
104 changes: 55 additions & 49 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# It is not intended for manual editing.
[[package]]
name = "anyhow"
version = "1.0.33"
version = "1.0.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1fd36ffbb1fb7c834eac128ea8d0e310c5aeb635548f9d58861e1308d46e71c"
checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7"

[[package]]
name = "ar"
Expand All @@ -31,28 +31,34 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"

[[package]]
name = "cc"
version = "1.0.61"
version = "1.0.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed67cbde08356238e75fc4656be4749481eeffb09e19f320a25237d5221c985d"
checksum = "f1770ced377336a88a67c473594ccc14eca6f4559217c34f64aac8f83d641b40"

[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"

[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-bforest"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-codegen"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
dependencies = [
"byteorder",
"cranelift-bforest",
Expand All @@ -69,27 +75,27 @@ dependencies = [

[[package]]
name = "cranelift-codegen-meta"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"

[[package]]
name = "cranelift-entity"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"

[[package]]
name = "cranelift-frontend"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -99,8 +105,8 @@ dependencies = [

[[package]]
name = "cranelift-module"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -111,8 +117,8 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
dependencies = [
"cranelift-codegen",
"raw-cpuid",
Expand All @@ -121,8 +127,8 @@ dependencies = [

[[package]]
name = "cranelift-object"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -134,8 +140,8 @@ dependencies = [

[[package]]
name = "cranelift-simplejit"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
version = "0.68.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#19640367dbf0da7093e61add3306c8d092644fb3"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
Expand All @@ -151,18 +157,18 @@ dependencies = [

[[package]]
name = "crc32fast"
version = "1.2.0"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
dependencies = [
"cfg-if",
"cfg-if 1.0.0",
]

[[package]]
name = "errno"
version = "0.2.6"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01"
checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe"
dependencies = [
"errno-dragonfly",
"libc",
Expand All @@ -187,9 +193,9 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"

[[package]]
name = "gimli"
version = "0.22.0"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724"
checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
dependencies = [
"indexmap",
]
Expand All @@ -212,17 +218,17 @@ dependencies = [

[[package]]
name = "libc"
version = "0.2.79"
version = "0.2.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743"
checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"

[[package]]
name = "libloading"
version = "0.6.4"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3557c9384f7f757f6d139cd3a4c62ef4e850696c16bf27924a5538c8a09717a1"
checksum = "1090080fe06ec2648d0da3881d9453d97e71a45f00eb179af7fdd7e3f686fdb0"
dependencies = [
"cfg-if",
"cfg-if 1.0.0",
"winapi",
]

Expand All @@ -232,7 +238,7 @@ version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
dependencies = [
"cfg-if",
"cfg-if 0.1.10",
]

[[package]]
Expand All @@ -246,9 +252,9 @@ dependencies = [

[[package]]
name = "object"
version = "0.21.1"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37fd5004feb2ce328a52b0b3d01dbf4ffff72583493900ed15f22d4111c51693"
checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397"
dependencies = [
"crc32fast",
"indexmap",
Expand All @@ -274,9 +280,9 @@ dependencies = [

[[package]]
name = "raw-cpuid"
version = "7.0.3"
version = "8.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf"
checksum = "1fdf7d9dbd43f3d81d94a49c1c3df73cc2b3827995147e6cf7f89d4ec5483e73"
dependencies = [
"bitflags",
"cc",
Expand Down Expand Up @@ -361,9 +367,9 @@ checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252"

[[package]]
name = "syn"
version = "1.0.44"
version = "1.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e03e57e4fcbfe7749842d53e24ccb9aa12b7252dbe5e91d2acad31834c8b8fdd"
checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -372,24 +378,24 @@ dependencies = [

[[package]]
name = "target-lexicon"
version = "0.11.0"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe2635952a442a01fd4cb53d98858b5e4bb461b02c0d111f22f31772e3e7a8b2"
checksum = "4ee5a98e506fb7231a304c3a1bd7c132a55016cf65001e0282480665870dfcb9"

[[package]]
name = "thiserror"
version = "1.0.21"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42"
checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e"
dependencies = [
"thiserror-impl",
]

[[package]]
name = "thiserror-impl"
version = "1.0.21"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab"
checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56"
dependencies = [
"proc-macro2",
"quote",
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 @@ -15,8 +15,8 @@ cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime/", bran
cranelift-simplejit = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", optional = true }
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
target-lexicon = "0.11.0"
gimli = { version = "0.22.0", default-features = false, features = ["write"]}
object = { version = "0.21.1", default-features = false, features = ["std", "read_core", "write", "coff", "elf", "macho", "pe"] }
gimli = { version = "0.23.0", default-features = false, features = ["write"]}
object = { version = "0.22.0", default-features = false, features = ["std", "read_core", "write", "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
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_cranelift/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This should build and run your project with rustc_codegen_cranelift instead of t
> You should prefer using the Cargo method.

```bash
$ $cg_clif_dir/build/cg_clif my_crate.rs
$ $cg_clif_dir/build/bin/cg_clif my_crate.rs
```

### Jit mode
Expand All @@ -68,7 +68,7 @@ $ $cg_clif_dir/build/cargo.sh jit
or

```bash
$ $cg_clif_dir/build/cg_clif --jit my_crate.rs
$ $cg_clif_dir/build/bin/cg_clif --jit my_crate.rs
```

### Shell
Expand All @@ -77,7 +77,7 @@ These are a few functions that allow you to easily run rust code from the shell

```bash
function jit_naked() {
echo "$@" | $cg_clif_dir/build/cg_clif - --jit
echo "$@" | $cg_clif_dir/build/bin/cg_clif - --jit
}

function jit() {
Expand Down
25 changes: 19 additions & 6 deletions compiler/rustc_codegen_cranelift/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,35 @@ while [[ $# != 0 ]]; do
done

# Build cg_clif
unset CARGO_TARGET_DIR
export RUSTFLAGS="-Zrun_dsymutil=no"
unamestr=$(uname)
if [[ "$unamestr" == 'Linux' ]]; then
export RUSTFLAGS='-Clink-arg=-Wl,-rpath=$ORIGIN/../lib '$RUSTFLAGS
elif [[ "$unamestr" == 'Darwin' ]]; then
export RUSTFLAGS='-Clink-arg=-Wl,-rpath,@loader_path/../lib -Zosx-rpath-install-name '$RUSTFLAGS
dylib_ext='dylib'
else
echo "Unsupported os"
exit 1
fi
if [[ "$CHANNEL" == "release" ]]; then
cargo build --release
else
cargo build
fi

rm -rf $target_dir
mkdir $target_dir
cp -a target/$CHANNEL/cg_clif{,_build_sysroot} target/$CHANNEL/*rustc_codegen_cranelift* $target_dir/
cp -a rust-toolchain scripts/config.sh scripts/cargo.sh $target_dir
rm -rf "$target_dir"
mkdir "$target_dir"
mkdir "$target_dir"/bin "$target_dir"/lib
ln target/$CHANNEL/cg_clif{,_build_sysroot} "$target_dir"/bin
ln target/$CHANNEL/*rustc_codegen_cranelift* "$target_dir"/lib
ln rust-toolchain scripts/config.sh scripts/cargo.sh "$target_dir"

if [[ "$build_sysroot" == "1" ]]; then
echo "[BUILD] sysroot"
export CG_CLIF_INCR_CACHE_DISABLED=1
dir=$(pwd)
cd $target_dir
time $dir/build_sysroot/build_sysroot.sh
cd "$target_dir"
time "$dir/build_sysroot/build_sysroot.sh"
fi
Loading