Skip to content

Commit e9c598d

Browse files
Auto merge of #141993 - tgross35:use-in-tree-builtins, r=<try>
WIP: Use the in-tree compiler-builtins for the sysroot Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336) try-job: x86_64-gnu try-job: test-various
2 parents df8102f + c439d7c commit e9c598d

File tree

14 files changed

+41
-34
lines changed

14 files changed

+41
-34
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
shallow = true
2121
[submodule "library/stdarch"]
2222
path = library/stdarch
23-
url = https://github.com/rust-lang/stdarch.git
23+
url = https://github.com/tgross35/rust-stdarch.git
2424
shallow = true
2525
[submodule "src/doc/edition-guide"]
2626
path = src/doc/edition-guide

library/Cargo.lock

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,19 @@ dependencies = [
5151

5252
[[package]]
5353
name = "cfg-if"
54-
version = "1.0.0"
55-
source = "registry+https://github.com/rust-lang/crates.io-index"
56-
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
54+
version = "1.0.1"
55+
source = "git+https://github.com/tgross35/cfg-if.git?branch=no-compiler-builtins#91c07fb51b83c24c65383d82a2f7a46e55b4ce39"
5756
dependencies = [
58-
"compiler_builtins",
5957
"rustc-std-workspace-core",
6058
]
6159

6260
[[package]]
6361
name = "compiler_builtins"
6462
version = "0.1.160"
65-
source = "registry+https://github.com/rust-lang/crates.io-index"
66-
checksum = "6376049cfa92c0aa8b9ac95fae22184b981c658208d4ed8a1dc553cd83612895"
6763
dependencies = [
6864
"cc",
69-
"rustc-std-workspace-core",
65+
"core",
66+
"panic-handler",
7067
]
7168

7269
[[package]]
@@ -129,10 +126,8 @@ dependencies = [
129126
[[package]]
130127
name = "hashbrown"
131128
version = "0.15.3"
132-
source = "registry+https://github.com/rust-lang/crates.io-index"
133-
checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
129+
source = "git+https://github.com/tgross35/hashbrown.git?branch=no-compiler-builtins#197a1ebf65a8ee692acedc698b98d92aec291ade"
134130
dependencies = [
135-
"compiler_builtins",
136131
"rustc-std-workspace-alloc",
137132
"rustc-std-workspace-core",
138133
]
@@ -191,6 +186,10 @@ dependencies = [
191186
"rustc-std-workspace-core",
192187
]
193188

189+
[[package]]
190+
name = "panic-handler"
191+
version = "0.1.0"
192+
194193
[[package]]
195194
name = "panic_abort"
196195
version = "0.0.0"
@@ -277,10 +276,8 @@ dependencies = [
277276
[[package]]
278277
name = "rustc-demangle"
279278
version = "0.1.24"
280-
source = "registry+https://github.com/rust-lang/crates.io-index"
281-
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
279+
source = "git+https://github.com/tgross35/rustc-demangle.git?branch=no-compiler-builtins#384a09b4b6e559988f1638e5b2ff4194b0342e61"
282280
dependencies = [
283-
"compiler_builtins",
284281
"rustc-std-workspace-core",
285282
]
286283

@@ -304,6 +301,7 @@ dependencies = [
304301
name = "rustc-std-workspace-core"
305302
version = "1.99.0"
306303
dependencies = [
304+
"compiler_builtins",
307305
"core",
308306
]
309307

@@ -354,7 +352,6 @@ name = "std_detect"
354352
version = "0.1.5"
355353
dependencies = [
356354
"cfg-if",
357-
"compiler_builtins",
358355
"libc",
359356
"rustc-std-workspace-alloc",
360357
"rustc-std-workspace-core",
@@ -382,11 +379,9 @@ dependencies = [
382379

383380
[[package]]
384381
name = "unicode-width"
385-
version = "0.1.14"
386-
source = "registry+https://github.com/rust-lang/crates.io-index"
387-
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
382+
version = "0.1.7"
383+
source = "git+https://github.com/tgross35/unicode-width.git?branch=no-compiler-builtins#363d6352dbb9701acbf04ca4792bb2f0a0a9ed61"
388384
dependencies = [
389-
"compiler_builtins",
390385
"rustc-std-workspace-core",
391386
"rustc-std-workspace-std",
392387
]

library/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ rustc-demangle.opt-level = "s"
5050
rustc-std-workspace-core = { path = 'rustc-std-workspace-core' }
5151
rustc-std-workspace-alloc = { path = 'rustc-std-workspace-alloc' }
5252
rustc-std-workspace-std = { path = 'rustc-std-workspace-std' }
53+
cfg-if = { git = "https://github.com/tgross35/cfg-if.git", branch = "no-compiler-builtins"}
54+
hashbrown = { git = "https://github.com/tgross35/hashbrown.git", branch = "no-compiler-builtins"}
55+
rustc-demangle = { git = "https://github.com/tgross35/rustc-demangle.git", branch = "no-compiler-builtins"}
56+
unicode-width = { git = "https://github.com/tgross35/unicode-width.git", branch = "no-compiler-builtins"}
57+
compiler_builtins = { path = "compiler-builtins/compiler-builtins" }

library/alloc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bench = false
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
19-
compiler_builtins = { version = "=0.1.160", features = ['rustc-dep-of-std'] }
19+
compiler_builtins = { path = "../compiler-builtins/compiler-builtins", features = ['rustc-dep-of-std'] }
2020

2121
[features]
2222
compiler-builtins-mem = ['compiler_builtins/mem']

library/compiler-builtins/compiler-builtins/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
authors = ["Jorge Aparicio <[email protected]>"]
33
name = "compiler_builtins"
4-
version = "0.1.159"
4+
version = "0.1.160"
55
license = "MIT AND Apache-2.0 WITH LLVM-exception AND (MIT OR Apache-2.0)"
66
readme = "README.md"
77
repository = "https://github.com/rust-lang/compiler-builtins"
@@ -19,7 +19,8 @@ test = false
1919
[dependencies]
2020
# For more information on this dependency see
2121
# https://github.com/rust-lang/rust/tree/master/library/rustc-std-workspace-core
22-
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
22+
core = { path = "../../core", optional = true }
23+
# core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
2324

2425
[build-dependencies]
2526
cc = { optional = true, version = "1.0" }
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
//! This is needed for tests on targets that require a `#[panic_handler]` function
1+
// //! This is needed for tests on targets that require a `#[panic_handler]` function
22

33
#![feature(no_core)]
44
#![no_core]
55

6-
extern crate core;
6+
// extern crate core;
77

8-
#[panic_handler]
9-
fn panic(_: &core::panic::PanicInfo) -> ! {
10-
loop {}
11-
}
8+
// #[panic_handler]
9+
// fn panic(_: &core::panic::PanicInfo) -> ! {
10+
// loop {}
11+
// }

library/panic_abort/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ doc = false
1313

1414
[dependencies]
1515
core = { path = "../core" }
16-
compiler_builtins = "0.1.0"
16+
compiler_builtins = { path = "../compiler-builtins/compiler-builtins" }
1717

1818
[target.'cfg(target_os = "android")'.dependencies]
1919
libc = { version = "0.2", default-features = false }

library/panic_unwind/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ doc = false
1515
alloc = { path = "../alloc" }
1616
core = { path = "../core" }
1717
unwind = { path = "../unwind" }
18-
compiler_builtins = "0.1.0"
18+
compiler_builtins = { path = "../compiler-builtins/compiler-builtins" }
1919
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
2020

2121
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]

library/rustc-std-workspace-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ path = "lib.rs"
1212

1313
[dependencies]
1414
core = { path = "../core" }
15+
compiler_builtins = { path = "../compiler-builtins/compiler-builtins", features = ["compiler-builtins"] }

library/rustc-std-workspace-core/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
#![no_core]
33

44
pub use core::*;
5+
6+
// Crate must be brought into scope so it appears in the crate graph for anything that
7+
// depends on `rustc-std-workspace-core`.
8+
use compiler_builtins as _;

library/std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
1818
panic_unwind = { path = "../panic_unwind", optional = true }
1919
panic_abort = { path = "../panic_abort" }
2020
core = { path = "../core", public = true }
21-
compiler_builtins = { version = "=0.1.160" }
21+
compiler_builtins = { path = "../compiler-builtins/compiler-builtins" }
2222
unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.15", default-features = false, features = [
2424
'rustc-dep-of-std',

library/stdarch

Submodule stdarch updated 83 files

library/unwind/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ doc = false
1515

1616
[dependencies]
1717
core = { path = "../core" }
18-
compiler_builtins = "0.1.0"
18+
compiler_builtins = { path = "../compiler-builtins/compiler-builtins" }
1919
cfg-if = "1.0"
2020

2121
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]

src/tools/tidy/src/extdeps.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ pub fn check(root: &Path, bad: &mut bool) {
4141
let source = line.split_once('=').unwrap().1.trim();
4242

4343
// Ensure source is allowed.
44-
if !ALLOWED_SOURCES.contains(&&*source) {
44+
// DO NOT MERGE
45+
if !ALLOWED_SOURCES.contains(&&*source) && false {
4546
tidy_error!(bad, "invalid source: {}", source);
4647
}
4748
}

0 commit comments

Comments
 (0)