Skip to content

Commit f64ecf1

Browse files
committed
WIP
1 parent 4c50674 commit f64ecf1

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

Cargo.lock

+2-3
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,8 @@ dependencies = [
205205

206206
[[package]]
207207
name = "ar_archive_writer"
208-
version = "0.4.0"
209-
source = "registry+https://github.com/rust-lang/crates.io-index"
210-
checksum = "de11a9d32db3327f981143bdf699ade4d637c6887b13b97e6e91a9154666963c"
208+
version = "0.3.3"
209+
source = "git+https://github.com/ChrisDenton/ar_archive_writer.git?branch=rename2#a5b424a6ef9d6416b299ac27c2dba224e2470253"
211210
dependencies = [
212211
"object 0.36.2",
213212
]

compiler/rustc_codegen_ssa/Cargo.toml

+12-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
# tidy-alphabetical-start
8-
ar_archive_writer = "0.4.0"
8+
ar_archive_writer = { git = 'https://github.com/ChrisDenton/ar_archive_writer.git', branch = "rename2" }
99
arrayvec = { version = "0.7", default-features = false }
1010
bitflags = "2.4.1"
1111
cc = "1.0.90"
@@ -52,7 +52,17 @@ libc = "0.2.50"
5252
[dependencies.object]
5353
version = "0.36.2"
5454
default-features = false
55-
features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write", "wasm"]
55+
features = [
56+
"read_core",
57+
"elf",
58+
"macho",
59+
"pe",
60+
"xcoff",
61+
"unaligned",
62+
"archive",
63+
"write",
64+
"wasm",
65+
]
5666

5767
[target.'cfg(windows)'.dependencies.windows]
5868
version = "0.52.0"

compiler/rustc_codegen_ssa/src/back/archive.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ pub trait ArchiveBuilderBuilder {
108108
&exports,
109109
machine,
110110
!sess.target.is_like_msvc,
111-
/*comdat=*/ false,
111+
// Tell the import library writer to make `.idata$3` a COMDAT section.
112+
// This prevents duplicate symbol errors when using /WHOLEARCHIVE
113+
// to link a staticlib with the MSVC linker.
114+
// See #129020
115+
true,
112116
) {
113117
sess.dcx()
114118
.emit_fatal(ErrorCreatingImportLibrary { lib_name, error: error.to_string() });

src/tools/tidy/src/extdeps.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const ALLOWED_SOURCES: &[&str] = &[
88
r#""registry+https://github.com/rust-lang/crates.io-index""#,
99
// This is `rust_team_data` used by `site` in src/tools/rustc-perf,
1010
r#""git+https://github.com/rust-lang/team#a5260e76d3aa894c64c56e6ddc8545b9a98043ec""#,
11+
r#""git+https://github.com/ChrisDenton/ar_archive_writer.git?branch=rename2#a5b424a6ef9d6416b299ac27c2dba224e2470253""#,
1112
];
1213

1314
/// Checks for external package sources. `root` is the path to the directory that contains the

0 commit comments

Comments
 (0)