Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Aug 18, 2024
1 parent 4c50674 commit f64ecf1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
5 changes: 2 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ dependencies = [

[[package]]
name = "ar_archive_writer"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de11a9d32db3327f981143bdf699ade4d637c6887b13b97e6e91a9154666963c"
version = "0.3.3"
source = "git+https://github.com/ChrisDenton/ar_archive_writer.git?branch=rename2#a5b424a6ef9d6416b299ac27c2dba224e2470253"
dependencies = [
"object 0.36.2",
]
Expand Down
14 changes: 12 additions & 2 deletions compiler/rustc_codegen_ssa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
# tidy-alphabetical-start
ar_archive_writer = "0.4.0"
ar_archive_writer = { git = 'https://github.com/ChrisDenton/ar_archive_writer.git', branch = "rename2" }
arrayvec = { version = "0.7", default-features = false }
bitflags = "2.4.1"
cc = "1.0.90"
Expand Down Expand Up @@ -52,7 +52,17 @@ libc = "0.2.50"
[dependencies.object]
version = "0.36.2"
default-features = false
features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write", "wasm"]
features = [
"read_core",
"elf",
"macho",
"pe",
"xcoff",
"unaligned",
"archive",
"write",
"wasm",
]

[target.'cfg(windows)'.dependencies.windows]
version = "0.52.0"
Expand Down
6 changes: 5 additions & 1 deletion compiler/rustc_codegen_ssa/src/back/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ pub trait ArchiveBuilderBuilder {
&exports,
machine,
!sess.target.is_like_msvc,
/*comdat=*/ false,
// Tell the import library writer to make `.idata$3` a COMDAT section.
// This prevents duplicate symbol errors when using /WHOLEARCHIVE
// to link a staticlib with the MSVC linker.
// See #129020
true,
) {
sess.dcx()
.emit_fatal(ErrorCreatingImportLibrary { lib_name, error: error.to_string() });
Expand Down
1 change: 1 addition & 0 deletions src/tools/tidy/src/extdeps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const ALLOWED_SOURCES: &[&str] = &[
r#""registry+https://github.com/rust-lang/crates.io-index""#,
// This is `rust_team_data` used by `site` in src/tools/rustc-perf,
r#""git+https://github.com/rust-lang/team#a5260e76d3aa894c64c56e6ddc8545b9a98043ec""#,
r#""git+https://github.com/ChrisDenton/ar_archive_writer.git?branch=rename2#a5b424a6ef9d6416b299ac27c2dba224e2470253""#,
];

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

0 comments on commit f64ecf1

Please sign in to comment.