| Bruno Cardoso Lopes | a5efe3a | 2015-10-02 15:10:33 +0000 | [diff] [blame] | 1 | // REQUIRES: system-darwin |
| 2 | |
| 3 | // Check that ld gets "-lto_library" and warnings about libLTO.dylib path. |
| 4 | |
| Vedant Kumar | b7df1e2 | 2016-08-30 20:36:50 +0000 | [diff] [blame^] | 5 | // RUN: mkdir -p %T/bin |
| 6 | // RUN: mkdir -p %T/lib |
| 7 | // RUN: touch %T/lib/libLTO.dylib |
| Bruno Cardoso Lopes | a5efe3a | 2015-10-02 15:10:33 +0000 | [diff] [blame] | 8 | // RUN: %clang -target x86_64-apple-darwin10 -### %s \ |
| Vedant Kumar | b7df1e2 | 2016-08-30 20:36:50 +0000 | [diff] [blame^] | 9 | // 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 Lopes | a5efe3a | 2015-10-02 15:10:33 +0000 | [diff] [blame] | 11 | // |
| 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 Kumar | b7df1e2 | 2016-08-30 20:36:50 +0000 | [diff] [blame^] | 17 | // RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH_WRN %s -input-file %t.log |
| Bruno Cardoso Lopes | a5efe3a | 2015-10-02 15:10:33 +0000 | [diff] [blame] | 18 | // |
| 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 Kumar | b7df1e2 | 2016-08-30 20:36:50 +0000 | [diff] [blame^] | 23 | // RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH_NOWRN %s -input-file %t.log |
| Bruno Cardoso Lopes | a5efe3a | 2015-10-02 15:10:33 +0000 | [diff] [blame] | 24 | // |
| 25 | // LINK_LTOLIB_PATH_NOWRN-NOT: warning: libLTO.dylib relative to clang installed dir not found; using 'ld' default search path instead |