File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ fn main() {
10
10
let const_extern_fn_cargo_feature =
11
11
env:: var ( "CARGO_FEATURE_CONST_EXTERN_FN" ) . is_ok ( ) ;
12
12
let libc_ci = env:: var ( "LIBC_CI" ) . is_ok ( ) ;
13
+ let target = env:: var ( "TARGET" ) . unwrap ( ) ;
13
14
14
15
if env:: var ( "CARGO_FEATURE_USE_STD" ) . is_ok ( ) {
15
16
println ! (
@@ -82,6 +83,10 @@ fn main() {
82
83
}
83
84
println ! ( "cargo:rustc-cfg=libc_const_extern_fn" ) ;
84
85
}
86
+
87
+ if target. contains ( "-apple-" ) {
88
+ println ! ( "cargo:rustc-link-lib=iconv" ) ;
89
+ }
85
90
}
86
91
87
92
fn rustc_minor_nightly ( ) -> Option < ( u32 , bool ) > {
Original file line number Diff line number Diff line change @@ -297,10 +297,8 @@ cfg_if! {
297
297
if #[ cfg( target_os = "l4re" ) ] {
298
298
// required libraries for L4Re are linked externally, ATM
299
299
} else if #[ cfg( feature = "std" ) ] {
300
- // cargo build. Most libraries are already pulled in by libstd dep
301
- #[ cfg_attr(
302
- any( target_os = "macos" , target_os = "ios" ) ,
303
- link( name = "iconv" ) ) ]
300
+ // cargo build, don't pull in anything extra as the libstd dep
301
+ // already pulls in all libs.
304
302
extern { }
305
303
} else if #[ cfg( all( target_os = "linux" ,
306
304
target_env = "gnu" ,
You can’t perform that action at this time.
0 commit comments