File tree Expand file tree Collapse file tree 6 files changed +9
-6
lines changed Expand file tree Collapse file tree 6 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ def get_asan_rtlib():
118118asan_rtlib = get_asan_rtlib ()
119119if asan_rtlib :
120120 ld64_cmd = 'DYLD_INSERT_LIBRARIES={} {}' .format (asan_rtlib , ld64_cmd )
121+ if config .osx_sysroot :
122+ ld64_cmd = '{} -syslibroot {}' .format (ld64_cmd , config .osx_sysroot )
121123
122124ocamlc_command = '%s ocamlc -cclib -L%s %s' % (
123125 config .ocamlfind_executable , config .llvm_lib_dir , config .ocaml_flags )
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ config.lit_tools_dir = path(r"@LLVM_LIT_TOOLS_DIR@")
1515config.python_executable = "@Python3_EXECUTABLE@"
1616config.gold_executable = "@GOLD_EXECUTABLE@"
1717config.ld64_executable = "@LD64_EXECUTABLE@"
18+ config.osx_sysroot = "@CMAKE_OSX_SYSROOT@"
1819config.ocamlfind_executable = "@OCAMLFIND@"
1920config.have_ocamlopt = @HAVE_OCAMLOPT@
2021config.have_ocaml_ounit = @HAVE_OCAML_OUNIT@
Original file line number Diff line number Diff line change 11; RUN: llvm-as %s -o %t.o
2- ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -dylib -arch x86_64 -macosx_version_min 10.10.0 -o %t.dylib %t.o -save-temps -undefined dynamic_lookup -exported_symbol _c -exported_symbol _b -exported_symbol _GlobLinkonce
2+ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -dylib -arch x86_64 -macosx_version_min 10.10.0 -o %t.dylib %t.o -save-temps -undefined dynamic_lookup -exported_symbol _c -exported_symbol _b -exported_symbol _GlobLinkonce -lSystem
33
44; RUN: llvm-dis %t.dylib.lto.opt.bc -o - | FileCheck --check-prefix=IR %s
55; check that @a is no longer a linkonce_odr definition
Original file line number Diff line number Diff line change 22; libLTO.dylib shouldn't assert on invalid inputs.
33; RUN: llvm-mc -triple=arm64-apple-ios7.0.0 -filetype=obj -o %t.o
44; RUN: llvm-ar r %t.a %t.o
5- ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.a
5+ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.a -lSystem
Original file line number Diff line number Diff line change 11; RUN: llvm-as %s -o %t.o
2- ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.o
2+ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.o -lSystem
33; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s
4- ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O2 -o %t.dylib %t.o
4+ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O2 -o %t.dylib %t.o -lSystem
55; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s
66
77target triple = "x86_64-apple-macosx10.8.0"
Original file line number Diff line number Diff line change 11; RUN: llvm-as %s -o %t.o
2- ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -stats -o %t.dylib %t.o 2>&1 | FileCheck --check-prefix=STATS %s
3- ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -o %t.dylib %t.o 2>&1 | FileCheck --check-prefix=NO_STATS %s
2+ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -stats -o %t.dylib %t.o -lSystem 2>&1 | FileCheck --check-prefix=STATS %s
3+ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -o %t.dylib %t.o -lSystem 2>&1 | FileCheck --check-prefix=NO_STATS %s
44; REQUIRES: asserts
55
66target triple = "x86_64-apple-macosx10.8.0"
You can’t perform that action at this time.
0 commit comments