5 $C{COMPILE_C} $DIR/gc.c -dynamiclib -o libnoobjc.dylib
6 $C{COMPILE_NOMEM} $DIR/gc.m -dynamiclib -o libnogc.dylib
7 $C{COMPILE_NOMEM} $DIR/gc.m -dynamiclib -o libsupportsgc.dylib -fobjc-gc
8 $C{COMPILE_NOMEM} $DIR/gc.m -dynamiclib -o librequiresgc.dylib -fobjc-gc-only
9 $C{COMPILE_NOMEM} $DIR/gc.m -dynamiclib -o librequiresgc.fake.dylib -fobjc-gc -install_name librequiresgc.dylib
11 $C{COMPILE} $DIR/gcenforcer.m -o gcenforcer.out
16 #include <objc/objc-auto.h>
22 for (i = 0; i < 1000; i++) {
23 testassert(dlopen_preflight("libsupportsgc.dylib"));
24 testassert(dlopen_preflight("libnoobjc.dylib"));
26 if (objc_collectingEnabled()) {
27 testassert(dlopen_preflight("librequiresgc.dylib"));
28 testassert(! dlopen_preflight("libnogc.dylib"));
30 testassert(! dlopen_preflight("librequiresgc.dylib"));
31 testassert(dlopen_preflight("libnogc.dylib"));