Skip to content

Commit bae6714

Browse files
authored
Rollup merge of #143492 - Diggsey:db-fix-object-ambiguity, r=RalfJung
Use `object` crate from crates.io to fix windows build error See https://rust-lang.zulipchat.com/#narrow/channel/386786-rustc-codegen-gcc/topic/Cannot.20compile.20rustc.20on.20Windows.2010/with/527240094
2 parents 017fe2f + ea7b756 commit bae6714

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

compiler/rustc_codegen_gcc/Cargo.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ dependencies = [
143143
"libc",
144144
]
145145

146+
[[package]]
147+
name = "object"
148+
version = "0.37.1"
149+
source = "registry+https://github.com/rust-lang/crates.io-index"
150+
checksum = "03fd943161069e1768b4b3d050890ba48730e590f57e56d4aa04e7e090e61b4a"
151+
dependencies = [
152+
"memchr",
153+
]
154+
146155
[[package]]
147156
name = "once_cell"
148157
version = "1.20.2"
@@ -179,6 +188,7 @@ dependencies = [
179188
"boml",
180189
"gccjit",
181190
"lang_tester",
191+
"object",
182192
"tempfile",
183193
]
184194

compiler/rustc_codegen_gcc/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ master = ["gccjit/master"]
2222
default = ["master"]
2323

2424
[dependencies]
25+
object = { version = "0.37.0", default-features = false, features = ["std", "read"] }
26+
tempfile = "3.20"
2527
gccjit = "2.7"
2628
#gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
2729

@@ -31,7 +33,6 @@ gccjit = "2.7"
3133
[dev-dependencies]
3234
boml = "0.3.1"
3335
lang_tester = "0.8.0"
34-
tempfile = "3.20"
3536

3637
[profile.dev]
3738
# By compiling dependencies with optimizations, performing tests gets much faster.

compiler/rustc_codegen_gcc/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@
2626
#![deny(clippy::pattern_type_mismatch)]
2727
#![allow(clippy::needless_lifetimes, clippy::uninlined_format_args)]
2828

29-
// Some "regular" crates we want to share with rustc
30-
extern crate object;
29+
// These crates are pulled from the sysroot because they are part of
30+
// rustc's public API, so we need to ensure version compatibility.
3131
extern crate smallvec;
32-
// FIXME(antoyo): clippy bug: remove the #[allow] when it's fixed.
33-
#[allow(unused_extern_crates)]
34-
extern crate tempfile;
3532
#[macro_use]
3633
extern crate tracing;
3734

0 commit comments

Comments
 (0)