X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/9d2e0767a8f401be0067937f63a08b1c4f79297d..a645023da60d22e86be13f7b4d97adeff8bc6665:/unit-tests/test-cases/llvm-integration/Makefile diff --git a/unit-tests/test-cases/llvm-integration/Makefile b/unit-tests/test-cases/llvm-integration/Makefile old mode 100755 new mode 100644 index 42c71e4..513dccc --- a/unit-tests/test-cases/llvm-integration/Makefile +++ b/unit-tests/test-cases/llvm-integration/Makefile @@ -43,8 +43,7 @@ run: all: zero one two three four five six seven eight nine ten \ eleven twelve thirteen fourteen fifteen sixteen seventeen \ - eighteen nineteen twenty - + eighteen nineteen zero: # @@ -117,7 +116,7 @@ five: # llvm : b5.c : Dfoo2 # MachO : main5.c : Dfoo3, Ufoo1 # - #echo "Five..." + #echo "verify that if call to mach-o is optimized away, mach-o func is dead stripped" ${LLVMGCC} ${CCFLAGS} --emit-llvm a5.c -c -o a5.o ${LLVMGCC} ${CCFLAGS} --emit-llvm b5.c -c -o b5.o ${LLVMGCC} ${CCFLAGS} main5.c -c -o main5.o @@ -204,7 +203,7 @@ twelve: # llvm : a12.c # MachO : main12.c # - #echo "Tweleve..." + #echo "verify tentative def in llvm .o referenced from mach-o" ${LLVMGCC} ${CCFLAGS} --emit-llvm a12.c -c -o a12.o ${LLVMGCC} ${CCFLAGS} main12.c -c -o main12.o ${LLVMGCC} ${CCFLAGS} a12.o main12.o -o main12.exe @@ -252,16 +251,16 @@ seventeen: ${LD} -arch ${ARCH} -r a17.o b17.o -o ab17.o file ab17.o | grep "Mach-O" | ${PASS_IFF_EMPTY} # echo "verify ld -r of bitcode and mach-o produces mach-o" - ${LLVMGCC} ${CCFLAGS} b17.c -c -o b17.o - ${LD} -arch ${ARCH} -r a17.o b17.o -o ab17.o - file ab17.o | grep "Mach-O" | ${PASS_IFF_STDIN} + ${LLVMGCC} ${CCFLAGS} b17.c -c -o b17m.o + ${LD} -arch ${ARCH} -r a17.o b17m.o -o ab17m.o + file ab17m.o | grep "Mach-O" | ${PASS_IFF_STDIN} eighteen: #echo verify ld -r -keep_private_externs works ${LLVMGCC} ${CCFLAGS} --emit-llvm a18.c -c -o a18.o ${LD} -arch ${ARCH} -r -keep_private_externs a18.o -o a18-rkpe.o - ObjectDump -nm a18-rkpe.o | grep _common_hidden1 | grep " hidden" | ${FAIL_IF_EMPTY} - ObjectDump -nm a18-rkpe.o | grep _func_hidden2 | grep " hidden" | ${FAIL_IF_EMPTY} + nm -nm a18-rkpe.o | grep _common_hidden1 | grep "private external" | ${FAIL_IF_EMPTY} + nm -nm a18-rkpe.o | grep _func_hidden2 | grep "private external" | ${FAIL_IF_EMPTY} #echo verify ld -r makes hidden symbols internal (except for commons) ${LD} -arch ${ARCH} -r a18.o -o a18-r.o #ObjectDump -nm a18-r.o | grep _common_hidden1 | grep " hidden" | ${FAIL_IF_EMPTY} @@ -275,15 +274,16 @@ nineteen: twenty: #echo verify bitcode files in archives works - ${LLVMGCC} ${CCFLAGS} --emit-llvm a20.c -c -o a20.o - ${LLVMGCC} ${CCFLAGS} --emit-llvm b20.c -c -o b20.o - ar cru lib20.a a20.o b20.o - ${LLVMGCC} ${CCFLAGS} main20.c lib20.a -all_load -o main20.exe - nm main20.exe | grep _foo | ${PASS_IFF_STDIN} - + #${LLVMGCC} ${CCFLAGS} --emit-llvm a20.c -c -o a20.o + #${LLVMGCC} ${CCFLAGS} --emit-llvm b20.c -c -o b20.o + #libtool -static a20.o b20.o -o lib20.a + #${LLVMGCC} ${CCFLAGS} main20.c lib20.a -all_load -o main20.exe + #nm main20.exe | grep _foo | ${PASS_IFF_STDIN} + + clean: - rm -rf *.o main*.exe big.* *.dylib main16.exe.lto.bc fail.log lib20.a + rm -rf *.o main*.exe big.* *.dylib main16.exe.lto.bc fail.log lib20.a main21.preload lib21.a