]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/lto-archive-objc/Makefile
ld64-274.1.tar.gz
[apple/ld64.git] / unit-tests / test-cases / lto-archive-objc / Makefile
1
2 TESTROOT = ../..
3 include ${TESTROOT}/include/common.makefile
4
5 #
6 # Check that -ObjC works with LTO
7 #
8
9 run: all
10
11 all:
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
21
22 clean:
23 rm -rf main *.o libstuff.a main.o main