Bruno Cardoso Lopes | a5efe3a | 2015-10-02 15:10:33 +0000 | [diff] [blame] | 1 | // REQUIRES: system-darwin |
| 2 | |
Nico Weber | 9b3baaa | 2016-11-22 19:38:07 +0000 | [diff] [blame] | 3 | // Check that ld gets "-lto_library". |
Bruno Cardoso Lopes | a5efe3a | 2015-10-02 15:10:33 +0000 | [diff] [blame] | 4 | |
Kuba Mracek | 5b57633 | 2017-08-15 19:47:06 +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 \ |
Kuba Mracek | 5b57633 | 2017-08-15 19:47:06 +0000 | [diff] [blame^] | 9 | // RUN: -ccc-install-dir %t/bin -mlinker-version=133 2> %t.log |
Vedant Kumar | b7df1e2 | 2016-08-30 20:36:50 +0000 | [diff] [blame] | 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 | |
Nico Weber | 9b3baaa | 2016-11-22 19:38:07 +0000 | [diff] [blame] | 15 | // Also pass -lto_library even if the file doesn't exist; if it's needed at |
| 16 | // link time, ld will complain instead. |
Bruno Cardoso Lopes | a5efe3a | 2015-10-02 15:10:33 +0000 | [diff] [blame] | 17 | // RUN: %clang -target x86_64-apple-darwin10 -### %s \ |
Mehdi Amini | 5ee58d3 | 2016-10-26 23:23:08 +0000 | [diff] [blame] | 18 | // RUN: -ccc-install-dir %S/dummytestdir -mlinker-version=133 2> %t.log |
Nico Weber | 9b3baaa | 2016-11-22 19:38:07 +0000 | [diff] [blame] | 19 | // RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH %s -input-file %t.log |