Commit 8d344dc 1 parent 0e8a8df commit 8d344dc Copy full SHA for 8d344dc
File tree 1 file changed +4
-4
lines changed
src/cargo/core/compiler/build_context
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -299,8 +299,9 @@ impl TargetInfo {
299
299
300
300
// Window shared library import/export files.
301
301
if crate_type. is_dynamic ( ) {
302
- if target_triple. ends_with ( "-windows-msvc" ) {
303
- assert ! ( suffix == ".dll" ) ;
302
+ // Note: Custom JSON specs can alter the suffix. For now, we'll
303
+ // just ignore non-DLL suffixes.
304
+ if target_triple. ends_with ( "-windows-msvc" ) && suffix == ".dll" {
304
305
// See https://docs.microsoft.com/en-us/cpp/build/reference/working-with-import-libraries-and-export-files
305
306
// for more information about DLL import/export files.
306
307
ret. push ( FileType {
@@ -318,8 +319,7 @@ impl TargetInfo {
318
319
crate_type : Some ( crate_type. clone ( ) ) ,
319
320
should_replace_hyphens : true ,
320
321
} ) ;
321
- } else if target_triple. ends_with ( "windows-gnu" ) {
322
- assert ! ( suffix == ".dll" ) ;
322
+ } else if target_triple. ends_with ( "windows-gnu" ) && suffix == ".dll" {
323
323
// See https://cygwin.com/cygwin-ug-net/dll.html for more
324
324
// information about GNU import libraries.
325
325
// LD can link DLL directly, but LLD requires the import library.
You can’t perform that action at this time.
0 commit comments