File tree Expand file tree Collapse file tree 5 files changed +7
-11
lines changed
src/cargo/core/compiler/build_context Expand file tree Collapse file tree 5 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -257,11 +257,11 @@ impl TargetInfo {
257257 flavor : FileFlavor :: Normal ,
258258 should_replace_hyphens : false ,
259259 } )
260- }
261- else if target_triple. ends_with ( "windows-gnu" )
262- && crate_type. ends_with ( "dylib" )
263- && suffix == ".dll"
260+ } else if target_triple. ends_with ( "windows-gnu" )
261+ && crate_type. ends_with ( "dylib" )
262+ && suffix == ".dll"
264263 {
264+ // LD can link DLL directly, but LLD requires the import library.
265265 ret. push ( FileType {
266266 suffix : ".dll.a" . to_string ( ) ,
267267 prefix : "lib" . to_string ( ) ,
Original file line number Diff line number Diff line change @@ -3810,8 +3810,7 @@ fn cdylib_final_outputs() {
38103810 if cfg ! ( target_env = "msvc" ) {
38113811 vec ! [ "foo_bar.dll.lib" , "foo_bar.dll" ]
38123812 } else {
3813- // FIXME https://github.com/rust-lang/cargo/pull/6875
3814- vec ! [ "foo_bar.dll" ]
3813+ vec ! [ "foo_bar.dll" , "libfoo_bar.dll.a" ]
38153814 }
38163815 } else if cfg ! ( target_os = "macos" ) {
38173816 vec ! [ "libfoo_bar.dylib" ]
Original file line number Diff line number Diff line change @@ -1663,7 +1663,6 @@ fn build_script_with_dynamic_native_dependency() {
16631663 let src = root.join(&file);
16641664 let dst = out_dir.join(&file);
16651665 fs::copy(src, dst).unwrap();
1666- // FIXME https://github.com/rust-lang/cargo/pull/6875
16671666 if cfg!(target_env = "msvc") {
16681667 fs::copy(root.join("builder.dll.lib"),
16691668 out_dir.join("builder.dll.lib")).unwrap();
Original file line number Diff line number Diff line change @@ -92,8 +92,7 @@ fn dynamic_library_with_debug() {
9292 & [ "libfoo.so" ] ,
9393 & [ "libfoo.dylib" ] ,
9494 & [ "foo.dll" , "foo.dll.lib" ] ,
95- // FIXME https://github.com/rust-lang/cargo/pull/6875
96- & [ "foo.dll" ] ,
95+ & [ "foo.dll" , "libfoo.dll.a" ] ,
9796 ) ;
9897}
9998
Original file line number Diff line number Diff line change @@ -180,8 +180,7 @@ fn plugin_with_dynamic_native_dependency() {
180180 let src = root.join(&file);
181181 let dst = out_dir.join(&file);
182182 fs::copy(src, dst).unwrap();
183- // FIXME https://github.com/rust-lang/cargo/pull/6875
184- if cfg!(target_env = "msvc") {
183+ if cfg!(target_env = "msvc") {
185184 fs::copy(root.join("builder.dll.lib"),
186185 out_dir.join("builder.dll.lib")).unwrap();
187186 }
You can’t perform that action at this time.
0 commit comments