3 include ${TESTROOT}/include/common.makefile
6 # Check that -ObjC works with LTO
12 ${CC} ${CCFLAGS} -flto foo.c -c -o foo.o
13 ${CC} ${CCFLAGS} -flto bar.m -c -o bar.o
14 ${CC} ${CCFLAGS} -flto baz.m -c -o baz.o
15 libtool -static foo.o bar.o baz.o -o libstuff.a
16 ${CC} ${CCFLAGS} -flto main.c -c -o main.o
17 ${CC} ${CCFLAGS} main.o -o main libstuff.a -framework Foundation -ObjC
18 nm main | grep _Bar | ${FAIL_IF_EMPTY}
19 nm main | grep MyCategory | grep doit | ${FAIL_IF_EMPTY}
20 ${PASS_IFF_GOOD_MACHO} main
23 rm -rf main *.o libstuff.a main.o main