2 dyld3 calls the load callback with its own internal lock held, which causes
3 this test to deadlock. Disable the test in dyld3 mode. If
4 rdar://problem/53769512 is fixed then remove this.
7 $C{COMPILE} $DIR/load-noobjc.m -o load-noobjc.exe
8 $C{COMPILE} $DIR/load-noobjc2.m -o libload-noobjc2.dylib -bundle -bundle_loader load-noobjc.exe
9 $C{COMPILE} $DIR/load-noobjc3.m -o libload-noobjc3.dylib -bundle -bundle_loader load-noobjc.exe
19 void *thread(void *arg __unused)
21 dlopen("libload-noobjc2.dylib", RTLD_LAZY);
22 fail("dlopen should not have returned");
27 semaphore_create(mach_task_self(), &go, SYNC_POLICY_FIFO, 0);
30 pthread_create(&th, nil, &thread, nil);
32 // Wait for thread to stop in libload-noobjc2's +load method.
35 // run nooobjc3's constructor function.
36 // There's no objc code here so it shouldn't require the +load lock.
37 void *dlh = dlopen("libload-noobjc3.dylib", RTLD_LAZY);
39 testassert(state == 1);