blob: 23e006a018508aa8ad838d13e854f77ff9a098b7 [file] [log] [blame]
Bruno Cardoso Lopesa5efe3a2015-10-02 15:10:33 +00001// REQUIRES: system-darwin
2
3// Check that ld gets "-lto_library" and warnings about libLTO.dylib path.
4
5// RUN: %clang -target x86_64-apple-darwin10 -### %s \
6// RUN: -mlinker-version=133 -flto 2> %t.log
7// RUN: cat %t.log
8// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH %s < %t.log
9//
10// LINK_LTOLIB_PATH: {{ld(.exe)?"}}
11// LINK_LTOLIB_PATH: "-lto_library"
12
13// RUN: %clang -target x86_64-apple-darwin10 -### %s \
14// RUN: -ccc-install-dir %S/dummytestdir -mlinker-version=133 -flto 2> %t.log
15// RUN: cat %t.log
16// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH_WRN %s < %t.log
17//
18// LINK_LTOLIB_PATH_WRN: warning: libLTO.dylib relative to clang installed dir not found; using 'ld' default search path instead
19
20// RUN: %clang -target x86_64-apple-darwin10 -### %s \
21// RUN: -ccc-install-dir %S/dummytestdir -mlinker-version=133 -Wno-liblto -flto 2> %t.log
22// RUN: cat %t.log
23// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH_NOWRN %s < %t.log
24//
25// LINK_LTOLIB_PATH_NOWRN-NOT: warning: libLTO.dylib relative to clang installed dir not found; using 'ld' default search path instead