File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -430,18 +430,25 @@ impl Library {
430430 }
431431 "-l" => {
432432 self . libs . push ( val. to_string ( ) ) ;
433- if statik && !is_system ( val, & dirs) {
434- let meta = format ! ( "rustc-link-lib=static={}" , val) ;
435- config. print_metadata ( & meta) ;
436- } else {
437- let meta = format ! ( "rustc-link-lib={}" , val) ;
438- config. print_metadata ( & meta) ;
439- }
440433 }
441434 _ => { }
442435 }
443436 }
444437
438+ for val in & self . libs {
439+ if statik {
440+ if is_system ( val, & dirs) {
441+ panic ! ( "The library \" {}\" is a system library, \
442+ which means it can't be linked statically!", val) ;
443+ }
444+ let meta = format ! ( "rustc-link-lib=static={}" , val) ;
445+ config. print_metadata ( & meta) ;
446+ } else {
447+ let meta = format ! ( "rustc-link-lib={}" , val) ;
448+ config. print_metadata ( & meta) ;
449+ }
450+ }
451+
445452 let mut iter = output. trim_right ( ) . split ( ' ' ) ;
446453 while let Some ( part) = iter. next ( ) {
447454 if part != "-framework" {
You can’t perform that action at this time.
0 commit comments