blob: 06152acf86bc806cada4af8e7fe55784717f15fc [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
Vedant Kumarb7df1e22016-08-30 20:36:50 +00005// RUN: mkdir -p %T/bin
6// RUN: mkdir -p %T/lib
7// RUN: touch %T/lib/libLTO.dylib
Bruno Cardoso Lopesa5efe3a2015-10-02 15:10:33 +00008// RUN: %clang -target x86_64-apple-darwin10 -### %s \
Vedant Kumarb7df1e22016-08-30 20:36:50 +00009// RUN: -ccc-install-dir %T/bin -mlinker-version=133 -flto 2> %t.log
10// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH %s -input-file %t.log
Bruno Cardoso Lopesa5efe3a2015-10-02 15:10:33 +000011//
12// LINK_LTOLIB_PATH: {{ld(.exe)?"}}
13// LINK_LTOLIB_PATH: "-lto_library"
14
15// RUN: %clang -target x86_64-apple-darwin10 -### %s \
16// RUN: -ccc-install-dir %S/dummytestdir -mlinker-version=133 -flto 2> %t.log
Vedant Kumarb7df1e22016-08-30 20:36:50 +000017// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH_WRN %s -input-file %t.log
Bruno Cardoso Lopesa5efe3a2015-10-02 15:10:33 +000018//
19// LINK_LTOLIB_PATH_WRN: warning: libLTO.dylib relative to clang installed dir not found; using 'ld' default search path instead
20
21// RUN: %clang -target x86_64-apple-darwin10 -### %s \
22// RUN: -ccc-install-dir %S/dummytestdir -mlinker-version=133 -Wno-liblto -flto 2> %t.log
Vedant Kumarb7df1e22016-08-30 20:36:50 +000023// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH_NOWRN %s -input-file %t.log
Bruno Cardoso Lopesa5efe3a2015-10-02 15:10:33 +000024//
25// LINK_LTOLIB_PATH_NOWRN-NOT: warning: libLTO.dylib relative to clang installed dir not found; using 'ld' default search path instead