1 // gc-off app loading gc-required dylib: should crash
2 // linker sees librequiresgc.fake.dylib, runtime uses librequiresgc.dylib
5 TEST_CONFIG GC=0 SDK=macos
9 objc\[\d+\]: '.*librequiresgc.dylib' was compiled with -fobjc-gc-only, but the application does not support GC
10 objc\[\d+\]: \*\*\* GC capability of application and some libraries did not match
15 $C{COMPILE_C} $DIR/gc.c -dynamiclib -o libnoobjc.dylib
16 $C{COMPILE_NOGC} $DIR/gc.m -dynamiclib -o libnogc.dylib
17 $C{COMPILE} $DIR/gc.m -dynamiclib -o libsupportsgc.dylib -fobjc-gc
18 $C{COMPILE} $DIR/gc.m -dynamiclib -o librequiresgc.dylib -fobjc-gc-only
19 $C{COMPILE} $DIR/gc.m -dynamiclib -o librequiresgc.fake.dylib -fobjc-gc -install_name librequiresgc.dylib
21 $C{COMPILE} $DIR/gc-main.m -x none librequiresgc.fake.dylib -o gcenforcer-requiresgc-1.out