@@ -53,6 +53,10 @@ impl Config {
53
53
batch : false ,
54
54
bind : if cfg ! ( target_os = "android" ) || cfg ! ( windows) {
55
55
( [ 0 , 0 , 0 , 0 ] , 12345 ) . into ( )
56
+ } else if cfg ! ( target_env = "sim" ) {
57
+ // iOS/tvOS/watchOS/visionOS simulators share network device
58
+ // with the host machine.
59
+ ( [ 127 , 0 , 0 , 1 ] , 12345 ) . into ( )
56
60
} else {
57
61
( [ 10 , 0 , 2 , 15 ] , 12345 ) . into ( )
58
62
} ,
@@ -262,10 +266,17 @@ fn handle_run(socket: TcpStream, work: &Path, tmp: &Path, lock: &Mutex<()>, conf
262
266
cmd. args ( args) ;
263
267
cmd. envs ( env) ;
264
268
265
- // On windows, libraries are just searched in the executable directory,
266
- // system directories, PWD, and PATH, in that order. PATH is the only one
267
- // we can change for this.
268
- let library_path = if cfg ! ( windows) { "PATH" } else { "LD_LIBRARY_PATH" } ;
269
+ let library_path = if cfg ! ( windows) {
270
+ // On windows, libraries are just searched in the executable directory,
271
+ // system directories, PWD, and PATH, in that order. PATH is the only
272
+ // one we can change for this.
273
+ "PATH"
274
+ } else if cfg ! ( target_vendor = "apple" ) {
275
+ // On Apple platforms, the environment variable is named differently.
276
+ "DYLD_LIBRARY_PATH"
277
+ } else {
278
+ "LD_LIBRARY_PATH"
279
+ } ;
269
280
270
281
// Support libraries were uploaded to `work` earlier, so make sure that's
271
282
// in `LD_LIBRARY_PATH`. Also include our own current dir which may have
0 commit comments