Make import libraries compatible with wholearchive
This commit is contained in:
parent
76fbf0af77
commit
40af2143f1
3 changed files with 8 additions and 4 deletions
|
@ -108,7 +108,11 @@ pub trait ArchiveBuilderBuilder {
|
|||
&exports,
|
||||
machine,
|
||||
!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()
|
||||
.emit_fatal(ErrorCreatingImportLibrary { lib_name, error: error.to_string() });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue