]> git.saurik.com Git - apple/objc4.git/blob - test/gcenforcer-nogc-2.m
objc4-551.1.tar.gz
[apple/objc4.git] / test / gcenforcer-nogc-2.m
1 // gc-on app loading gc-off dylib: should crash
2
3 /*
4 TEST_CONFIG MEM=gc SDK=macos
5 TEST_CRASHES
6
7 TEST_RUN_OUTPUT
8 objc\[\d+\]: '.*libnogc.dylib' was not compiled with -fobjc-gc or -fobjc-gc-only, but the application requires GC
9 objc\[\d+\]: \*\*\* GC capability of application and some libraries did not match
10 CRASHED: SIGILL
11 END
12
13 TEST_BUILD
14 $C{COMPILE_C} $DIR/gc.c -dynamiclib -o libnoobjc.dylib
15 $C{COMPILE_NOMEM} $DIR/gc.m -dynamiclib -o libnogc.dylib
16 $C{COMPILE} $DIR/gc.m -dynamiclib -o libsupportsgc.dylib -fobjc-gc
17 $C{COMPILE} $DIR/gc.m -dynamiclib -o librequiresgc.dylib -fobjc-gc-only
18 $C{COMPILE} $DIR/gc.m -dynamiclib -o librequiresgc.fake.dylib -fobjc-gc -install_name librequiresgc.dylib
19
20 $C{COMPILE} $DIR/gc-main.m -x none libnogc.dylib -o gcenforcer-nogc-2.out
21 END
22 */