File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -75,17 +75,12 @@ fn main() {
7575
7676 // Situations where we build unconditionally.
7777 //
78- // MSVC basically never has it preinstalled, MinGW picks up a bunch of weird
79- // paths we don't like, `want_static` may force us, and cross compiling almost
80- // never has a prebuilt version.
81- //
82- // Apple platforms have libz.1.dylib, and it's usually available even when
83- // cross compiling (via fat binary or in the target's Xcode SDK)
84- let cross_compiling = target != host;
78+ // - MSVC basically never has zlib preinstalled
79+ // - MinGW picks up a bunch of weird paths we don't like
80+ // - Explicit opt-in via `want_static`
8581 if target. contains ( "msvc" )
8682 || target. contains ( "pc-windows-gnu" )
8783 || want_static
88- || ( cross_compiling && !target. contains ( "-apple-" ) )
8984 {
9085 return build_zlib ( & mut cfg, & target) ;
9186 }
@@ -101,6 +96,7 @@ fn main() {
10196 return ;
10297 }
10398
99+ // For convenience fallback to building zlib if attempting to link zlib failed
104100 build_zlib ( & mut cfg, & target)
105101}
106102
You can’t perform that action at this time.
0 commit comments