@@ -277,16 +277,20 @@ cfg_if! {
277
277
// cargo build, don't pull in anything extra as the libstd dep
278
278
// already pulls in all libs.
279
279
} else if #[ cfg( target_env = "musl" ) ] {
280
- #[ link( name = "c" , kind = "static" , cfg( target_feature = "crt-static" ) ) ]
281
- #[ link( name = "c" , cfg( not( target_feature = "crt-static" ) ) ) ]
280
+ #[ cfg_attr( feature = "stdbuild" ,
281
+ link( name = "c" , kind = "static" ,
282
+ cfg( target_feature = "crt-static" ) ) ) ]
283
+ #[ cfg_attr( feature = "stdbuild" ,
284
+ link( name = "c" , cfg( not( target_feature = "crt-static" ) ) ) ) ]
282
285
extern { }
283
286
} else if #[ cfg( target_os = "emscripten" ) ] {
284
287
#[ link( name = "c" ) ]
285
288
extern { }
286
- } else if #[ cfg( all( target_os = "netbsd" , target_vendor = "rumprun" ) ) ] {
289
+ } else if #[ cfg( all( target_os = "netbsd" ) ) ] {
287
290
// Since we don't use -nodefaultlibs on Rumprun, libc is always pulled
288
291
// in automatically by the linker. We avoid passing it explicitly, as it
289
292
// causes some versions of binutils to crash with an assertion failure.
293
+ #[ cfg_attr( feature = "stdbuild" , target_vendor = "rumprun" ) ]
290
294
#[ link( name = "m" ) ]
291
295
extern { }
292
296
} else if #[ cfg( any( target_os = "macos" ,
0 commit comments