| 1 |
// REQUIRES: system-windows |
| 2 |
|
| 3 |
// We used to require adding ".exe" suffix when cross-compiling on Windows. |
| 4 |
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \ |
| 5 |
// RUN: -B %S/Inputs/fuse_ld_windows -fuse-ld=foo 2>&1 \ |
| 6 |
// RUN: | FileCheck %s |
| 7 |
|
| 8 |
// Check that the old variant still works. |
| 9 |
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \ |
| 10 |
// RUN: -B %S/Inputs/fuse_ld_windows -fuse-ld=foo.exe 2>&1 \ |
| 11 |
// RUN: | FileCheck %s |
| 12 |
|
| 13 |
// With the full path, the extension can be omitted, too, |
| 14 |
// because Windows allows that. |
| 15 |
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \ |
| 16 |
// RUN: -fuse-ld=%S/Inputs/fuse_ld_windows/ld.foo 2>&1 \ |
| 17 |
// RUN: | FileCheck %s |
| 18 |
|
| 19 |
// Check that the full path with the extension works too. |
| 20 |
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \ |
| 21 |
// RUN: -fuse-ld=%S/Inputs/fuse_ld_windows/ld.foo.exe 2>&1 \ |
| 22 |
// RUN: | FileCheck %s |
| 23 |
|
| 24 |
// CHECK-NOT: invalid linker name |
| 25 |
// CHECK: /Inputs/fuse_ld_windows{{/|\\\\}}ld.foo |