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 @@ -115,6 +115,8 @@ def get_asan_rtlib():
115
115
asan_rtlib = get_asan_rtlib ()
116
116
if asan_rtlib :
117
117
ld64_cmd = 'DYLD_INSERT_LIBRARIES={} {}' .format (asan_rtlib , ld64_cmd )
118
+ if config .osx_sysroot :
119
+ ld64_cmd = '{} -syslibroot {}' .format (ld64_cmd , config .osx_sysroot )
118
120
119
121
ocamlc_command = '%s ocamlc -cclib -L%s %s' % (
120
122
config .ocamlfind_executable , config .llvm_lib_dir , config .ocaml_flags )
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
17
17
config.python_executable = "@Python3_EXECUTABLE@"
18
18
config.gold_executable = "@GOLD_EXECUTABLE@"
19
19
config.ld64_executable = "@LD64_EXECUTABLE@"
20
+ config.osx_sysroot = "@CMAKE_OSX_SYSROOT@"
20
21
config.ocamlfind_executable = "@OCAMLFIND@"
21
22
config.have_ocamlopt = @HAVE_OCAMLOPT@
22
23
config.have_ocaml_ounit = @HAVE_OCAML_OUNIT@
Original file line number Diff line number Diff line change 1
1
; 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
3
3
4
4
; RUN: llvm-dis %t.dylib.lto.opt.bc -o - | FileCheck --check-prefix=IR %s
5
5
; check that @a is no longer a linkonce_odr definition
Original file line number Diff line number Diff line change 2
2
; libLTO.dylib shouldn't assert on invalid inputs.
3
3
; RUN: llvm-mc -triple=arm64-apple-ios7.0.0 -filetype=obj -o %t.o
4
4
; 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 1
1
; 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
3
3
; 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
5
5
; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s
6
6
7
7
target triple = "x86_64-apple-macosx10.8.0"
Original file line number Diff line number Diff line change 1
1
; 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
4
4
; REQUIRES: asserts
5
5
6
6
target triple = "x86_64-apple-macosx10.8.0"
You can’t perform that action at this time.
0 commit comments