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() {
75
75
76
76
// Situations where we build unconditionally.
77
77
//
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`
85
81
if target. contains ( "msvc" )
86
82
|| target. contains ( "pc-windows-gnu" )
87
83
|| want_static
88
- || ( cross_compiling && !target. contains ( "-apple-" ) )
89
84
{
90
85
return build_zlib ( & mut cfg, & target) ;
91
86
}
@@ -101,6 +96,7 @@ fn main() {
101
96
return ;
102
97
}
103
98
99
+ // For convenience fallback to building zlib if attempting to link zlib failed
104
100
build_zlib ( & mut cfg, & target)
105
101
}
106
102
You can’t perform that action at this time.
0 commit comments