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