Skip to content

Commit

Permalink
Auto merge of rust-lang#132546 - workingjubilee:rollup-r9mkkhd, r=wor…
Browse files Browse the repository at this point in the history
…kingjubilee

Rollup of 12 pull requests

Successful merges:

 - rust-lang#132393 (Docs: added brief colon explanation)
 - rust-lang#132419 (PassWrapper: adapt for llvm/llvm-project@b01e2a8b5620466c3b)
 - rust-lang#132437 (coverage: Regression test for inlining into an uninstrumented crate)
 - rust-lang#132458 (get rid of a whole bunch of unnecessary rustc_const_unstable attributes)
 - rust-lang#132499 (unicode_data.rs: show command for generating file)
 - rust-lang#132503 (better test for const HashMap; remove const_hash leftovers)
 - rust-lang#132514 (Port most of `--print=target-cpus` to Rust)
 - rust-lang#132520 (NFC add known bug nr to test)
 - rust-lang#132522 (make codegen help output more consistent)
 - rust-lang#132523 (Added regression test for generics index out of bounds)
 - rust-lang#132526 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang#132528 (Use `*_opt` typeck results fns to not ICE in fallback suggestion)
 - rust-lang#132540 (Do not format generic consts)

Failed merges:

 - rust-lang#132511 (stabilize const_arguments_as_str)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Nov 3, 2024
2 parents 8ccb78e + 5516671 commit 728065d
Show file tree
Hide file tree
Showing 66 changed files with 502 additions and 497 deletions.
6 changes: 6 additions & 0 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@ pub struct WhereClause {
pub span: Span,
}

impl WhereClause {
pub fn is_empty(&self) -> bool {
!self.has_where_token && self.predicates.is_empty()
}
}

impl Default for WhereClause {
fn default() -> WhereClause {
WhereClause { has_where_token: false, predicates: ThinVec::new(), span: DUMMY_SP }
Expand Down
130 changes: 54 additions & 76 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
version = 4

[[package]]
name = "ahash"
Expand Down Expand Up @@ -46,24 +46,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-bforest"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b80c3a50b9c4c7e5b5f73c0ed746687774fc9e36ef652b110da8daebf0c6e0e6"
checksum = "8ea5e7afe85cadb55c4c1176268a2ac046fdff8dfaeca39e18581b9dc319ca9e"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-bitset"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38778758c2ca918b05acb2199134e0c561fb577c50574259b26190b6c2d95ded"
checksum = "8ab25ef3be935a80680e393183e1f94ef507e93a24a8369494d2c6818aedb3e3"

[[package]]
name = "cranelift-codegen"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58258667ad10e468bfc13a8d620f50dfcd4bb35d668123e97defa2549b9ad397"
checksum = "900a19b84545924f1851cbfe386962edfc4ecbc3366a254825cf1ecbcda8ba08"
dependencies = [
"bumpalo",
"cranelift-bforest",
Expand All @@ -74,7 +74,7 @@ dependencies = [
"cranelift-entity",
"cranelift-isle",
"gimli",
"hashbrown 0.14.5",
"hashbrown",
"log",
"regalloc2",
"rustc-hash",
Expand All @@ -84,42 +84,42 @@ dependencies = [

[[package]]
name = "cranelift-codegen-meta"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "043f0b702e529dcb07ff92bd7d40e7d5317b5493595172c5eb0983343751ee06"
checksum = "08c73b2395ffe9e7b4fdf7e2ebc052e7e27af13f68a964985346be4da477a5fc"
dependencies = [
"cranelift-codegen-shared",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7763578888ab53eca5ce7da141953f828e82c2bfadcffc106d10d1866094ffbb"
checksum = "7d9ed0854e96a4ff0879bff39d078de8dea7f002721c9494c1fdb4e1baa86ccc"

[[package]]
name = "cranelift-control"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32db15f08c05df570f11e8ab33cb1ec449a64b37c8a3498377b77650bef33d8b"
checksum = "b4aca921dd422e781409de0129c255768fec5dec1dae83239b497fb9138abb89"
dependencies = [
"arbitrary",
]

[[package]]
name = "cranelift-entity"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5289cdb399381a27e7bbfa1b42185916007c3d49aeef70b1d01cb4caa8010130"
checksum = "e2d770e6605eccee15b49decdd82cd26f2b6404767802471459ea49c57379a98"
dependencies = [
"cranelift-bitset",
]

[[package]]
name = "cranelift-frontend"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31ba8ab24eb9470477e98ddfa3c799a649ac5a0d9a2042868c4c952133c234e8"
checksum = "29268711cb889cb39215b10faf88b9087d4c9e1d2633581e4f722a2bf4bb4ef9"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -129,15 +129,15 @@ dependencies = [

[[package]]
name = "cranelift-isle"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b72a3c5c166a70426dcb209bdd0bb71a787c1ea76023dc0974fbabca770e8f9"
checksum = "dc65156f010aed1985767ad1bff0eb8d186743b7b03e23d0c17604a253e3f356"

[[package]]
name = "cranelift-jit"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df32578a47582e49b4fc1f9a5786839d9be1fedaa9f00bea7612c54425663c6b"
checksum = "40ba6b46367a4f466cfb1abe32793fa1a0f96d862251491b01a44726b8ed9445"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -150,14 +150,14 @@ dependencies = [
"region",
"target-lexicon",
"wasmtime-jit-icache-coherence",
"windows-sys",
"windows-sys 0.59.0",
]

[[package]]
name = "cranelift-module"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96094a758cdb543c9143f70817cd31069fecd49f50981a0fac06820ac011dc2f"
checksum = "007607022a4883ebdffc46c0925e2e10babf2a565ae78518034ade722aa825d2"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -166,9 +166,9 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46a42424c956bbc31fc5c2706073df896156c5420ae8fa2a5d48dbc7b295d71b"
checksum = "d8bf9b361eaf5a7627647270fabf1dc910d993edbeaf272a652c107861ebe9c2"
dependencies = [
"cranelift-codegen",
"libc",
Expand All @@ -177,9 +177,9 @@ dependencies = [

[[package]]
name = "cranelift-object"
version = "0.111.0"
version = "0.113.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cf5e2484ab47fe38a3150747cdd2016535f13542a925acca152b63383a6591b"
checksum = "30ca5c38fa00c0cd943035391bdcc84ed00748f17c66c682e410f5a62f234d44"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand Down Expand Up @@ -213,24 +213,15 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"

[[package]]
name = "gimli"
version = "0.29.0"
version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
dependencies = [
"fallible-iterator",
"indexmap",
"stable_deref_trait",
]

[[package]]
name = "hashbrown"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
dependencies = [
"ahash",
]

[[package]]
name = "hashbrown"
version = "0.14.5"
Expand All @@ -247,7 +238,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
dependencies = [
"equivalent",
"hashbrown 0.14.5",
"hashbrown",
]

[[package]]
Expand All @@ -273,10 +264,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"

[[package]]
name = "mach"
version = "0.3.2"
name = "mach2"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709"
dependencies = [
"libc",
]
Expand All @@ -294,7 +285,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e"
dependencies = [
"crc32fast",
"hashbrown 0.14.5",
"hashbrown",
"indexmap",
"memchr",
]
Expand Down Expand Up @@ -325,11 +316,11 @@ dependencies = [

[[package]]
name = "regalloc2"
version = "0.9.3"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6"
checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0"
dependencies = [
"hashbrown 0.13.2",
"hashbrown",
"log",
"rustc-hash",
"slice-group-by",
Expand All @@ -338,21 +329,21 @@ dependencies = [

[[package]]
name = "region"
version = "2.2.0"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0"
checksum = "e6b6ebd13bc009aef9cd476c1310d49ac354d36e240cf1bd753290f3dc7199a7"
dependencies = [
"bitflags",
"libc",
"mach",
"winapi",
"mach2",
"windows-sys 0.52.0",
]

[[package]]
name = "rustc-hash"
version = "1.1.0"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"

[[package]]
name = "rustc_codegen_cranelift"
Expand Down Expand Up @@ -421,43 +412,30 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"

[[package]]
name = "wasmtime-jit-icache-coherence"
version = "24.0.0"
version = "26.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d15de8429db996f0d17a4163a35eccc3f874cbfb50f29c379951ea1bbb39452e"
checksum = "6e458e6a1a010a53f86ac8d75837c0c6b2ce3e54b7503b2f1dc5629a4a541f5a"
dependencies = [
"anyhow",
"cfg-if",
"libc",
"windows-sys",
"windows-sys 0.59.0",
]

[[package]]
name = "winapi"
version = "0.3.9"
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
"windows-targets",
]

[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"

[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

[[package]]
name = "windows-sys"
version = "0.52.0"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
Expand Down
14 changes: 7 additions & 7 deletions compiler/rustc_codegen_cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.111.0", default-features = false, features = ["std", "unwind", "all-arch"] }
cranelift-frontend = { version = "0.111.0" }
cranelift-module = { version = "0.111.0" }
cranelift-native = { version = "0.111.0" }
cranelift-jit = { version = "0.111.0", optional = true }
cranelift-object = { version = "0.111.0" }
cranelift-codegen = { version = "0.113.0", default-features = false, features = ["std", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.113.0" }
cranelift-module = { version = "0.113.0" }
cranelift-native = { version = "0.113.0" }
cranelift-jit = { version = "0.113.0", optional = true }
cranelift-object = { version = "0.113.0" }
target-lexicon = "0.12.0"
gimli = { version = "0.29", default-features = false, features = ["write"] }
gimli = { version = "0.31", default-features = false, features = ["write"] }
object = { version = "0.36", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

indexmap = "2.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,6 @@ pub(crate) fn build_sysroot(
.install_into_sysroot(&dist_dir);
}

// Copy std for the host to the lib dir. This is necessary for the jit mode to find
// libstd.
for lib in host.libs {
let filename = lib.file_name().unwrap().to_str().unwrap();
if filename.contains("std-") && !filename.contains(".rlib") {
try_hard_link(&lib, dist_dir.join("lib").join(lib.file_name().unwrap()));
}
}

let mut target_compiler = {
let rustc_clif = dist_dir.join(wrapper_base_name.replace("____", "rustc-clif"));
let rustdoc_clif = dist_dir.join(wrapper_base_name.replace("____", "rustdoc-clif"));
Expand Down
Loading

0 comments on commit 728065d

Please sign in to comment.