Make import libraries compatible with wholearchive
This commit is contained in:
parent
76fbf0af77
commit
40af2143f1
3 changed files with 8 additions and 4 deletions
|
@ -205,9 +205,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ar_archive_writer"
|
name = "ar_archive_writer"
|
||||||
version = "0.4.0"
|
version = "0.4.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "de11a9d32db3327f981143bdf699ade4d637c6887b13b97e6e91a9154666963c"
|
checksum = "01667f6f40216b9a0b2945e05fed5f1ad0ab6470e69cb9378001e37b1c0668e4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"object 0.36.2",
|
"object 0.36.2",
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,7 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# tidy-alphabetical-start
|
# tidy-alphabetical-start
|
||||||
ar_archive_writer = "0.4.0"
|
ar_archive_writer = "0.4.2"
|
||||||
arrayvec = { version = "0.7", default-features = false }
|
arrayvec = { version = "0.7", default-features = false }
|
||||||
bitflags = "2.4.1"
|
bitflags = "2.4.1"
|
||||||
cc = "1.0.90"
|
cc = "1.0.90"
|
||||||
|
|
|
@ -108,7 +108,11 @@ pub trait ArchiveBuilderBuilder {
|
||||||
&exports,
|
&exports,
|
||||||
machine,
|
machine,
|
||||||
!sess.target.is_like_msvc,
|
!sess.target.is_like_msvc,
|
||||||
/*comdat=*/ false,
|
// Enable compatibility with MSVC's `/WHOLEARCHIVE` flag.
|
||||||
|
// Without this flag a duplicate symbol error would be emitted
|
||||||
|
// when linking a rust staticlib using `/WHOLEARCHIVE`.
|
||||||
|
// See #129020
|
||||||
|
true,
|
||||||
) {
|
) {
|
||||||
sess.dcx()
|
sess.dcx()
|
||||||
.emit_fatal(ErrorCreatingImportLibrary { lib_name, error: error.to_string() });
|
.emit_fatal(ErrorCreatingImportLibrary { lib_name, error: error.to_string() });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue