|
172 | 172 | // CHECK-SYSROOT: {{ld(\.exe)?}}"
|
173 | 173 | // CHECK-SYSROOT-SAME: "--sysroot=mysdk"
|
174 | 174 |
|
175 |
| -// Test that "." is always added to library search paths. This is long-standing |
176 |
| -// behavior, unique to PlayStation toolchains. |
177 |
| - |
178 |
| -// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>&1 | FileCheck --check-prefixes=CHECK-LDOT %s |
179 |
| - |
180 |
| -// CHECK-LDOT: {{ld(\.exe)?}}" |
181 |
| -// CHECK-LDOT-SAME: "-L." |
182 |
| - |
183 |
| -// Test that <sdk-root>/target/lib is added to library search paths, if it |
184 |
| -// exists and no --sysroot is specified. Also confirm that CRT objects are |
185 |
| -// found there. |
| 175 | +// Test implicit library search paths are supplied to the linker, after any |
| 176 | +// search paths specified by the user. <sdk-root>/target/lib is implicitly |
| 177 | +// added if it exists and no --sysroot is specified. CRT objects are found |
| 178 | +// there. "." is always implicitly added to library search paths. This is |
| 179 | +// long-standing behavior, unique to PlayStation toolchains. |
186 | 180 |
|
187 | 181 | // RUN: rm -rf %t.dir && mkdir %t.dir
|
188 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=%t.dir %clang --target=x64_64-sie-ps5 %s -### 2>&1 | FileCheck --check-prefixes=CHECK-NO-TARGETLIB %s |
189 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=%t.dir %clang --target=x64_64-sie-ps5 %s -### --sysroot=%t.dir 2>&1 | FileCheck --check-prefixes=CHECK-NO-TARGETLIB %s |
| 182 | +// RUN: env SCE_PROSPERO_SDK_DIR=%t.dir %clang --target=x64_64-sie-ps5 %s -### -Luser 2>&1 | FileCheck --check-prefixes=CHECK-NO-TARGETLIB %s |
| 183 | +// RUN: env SCE_PROSPERO_SDK_DIR=%t.dir %clang --target=x64_64-sie-ps5 %s -### -Luser --sysroot=%t.dir 2>&1 | FileCheck --check-prefixes=CHECK-NO-TARGETLIB %s |
190 | 184 |
|
191 | 185 | // CHECK-NO-TARGETLIB: {{ld(\.exe)?}}"
|
| 186 | +// CHECK-NO-TARGETLIB-SAME: "-Luser" |
192 | 187 | // CHECK-NO-TARGETLIB-NOT: "-L{{.*[/\\]}}target/lib"
|
| 188 | +// CHECK-NO-TARGETLIB-SAME: "-L." |
193 | 189 |
|
194 | 190 | // RUN: mkdir -p %t.dir/target/lib
|
195 | 191 | // RUN: touch %t.dir/target/lib/crti.o
|
196 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=%t.dir %clang --target=x64_64-sie-ps5 %s -### 2>&1 | FileCheck --check-prefixes=CHECK-TARGETLIB %s |
| 192 | +// RUN: env SCE_PROSPERO_SDK_DIR=%t.dir %clang --target=x64_64-sie-ps5 %s -### -Luser 2>&1 | FileCheck --check-prefixes=CHECK-TARGETLIB %s |
197 | 193 |
|
198 | 194 | // CHECK-TARGETLIB: {{ld(\.exe)?}}"
|
| 195 | +// CHECK-TARGETLIB-SAME: "-Luser" |
199 | 196 | // CHECK-TARGETLIB-SAME: "-L{{.*[/\\]}}target/lib"
|
| 197 | +// CHECK-TARGETLIB-SAME: "-L." |
200 | 198 | // CHECK-TARGETLIB-SAME: "{{.*[/\\]}}target{{/|\\\\}}lib{{/|\\\\}}crti.o"
|
0 commit comments