| 1 |
// RUN: %clang --target=i686-pc-windows-msvc -fuse-ld=link -L/var/empty -L/usr/lib -### %s 2>&1 | FileCheck --check-prefix=BASIC %s |
| 2 |
// BASIC: link.exe" |
| 3 |
// BASIC-SAME: "-out:a.exe" |
| 4 |
// BASIC-SAME: "-defaultlib:libcmt" "-defaultlib:oldnames" |
| 5 |
// BASIC-SAME: "-libpath:/var/empty" "-libpath:/usr/lib" |
| 6 |
// BASIC-SAME: "-nologo" |
| 7 |
// BASIC-NOT: "-Brepro" |
| 8 |
// BASIC-NOT: "-dll" |
| 9 |
// BASIC-NOT: subsystem:console" |
| 10 |
|
| 11 |
// RUN: %clang --target=i686-pc-windows-msvc -shared -o a.dll -fuse-ld=link -### %s 2>&1 | FileCheck --check-prefix=DLL %s |
| 12 |
// DLL: link.exe" |
| 13 |
// DLL-SAME: "-out:a.dll" |
| 14 |
// DLL-SAME: "-defaultlib:libcmt" "-defaultlib:oldnames" |
| 15 |
// DLL-SAME: "-nologo" "-dll" |
| 16 |
|
| 17 |
// RUN: %clang_cl /Brepro -fuse-ld=link -### -- %s 2>&1 | FileCheck --check-prefix=REPRO %s |
| 18 |
// REPRO: link.exe" |
| 19 |
// REPRO-SAME: "-out:msvc-link.exe" |
| 20 |
// REPRO-SAME: "-nologo" |
| 21 |
// REPRO-SAME: "-Brepro" |
| 22 |
|
| 23 |
// RUN: %clang_cl /Brepro- -fuse-ld=link -### -- %s 2>&1 | FileCheck --check-prefix=NOREPRO %s |
| 24 |
// NOREPRO: link.exe" |
| 25 |
// NOREPRO-SAME: "-out:msvc-link.exe" |
| 26 |
// NOREPRO-SAME: "-nologo" |
| 27 |
// NOREPRO-NOT: "-Brepro" |
| 28 |
|
| 29 |
// RUN: %clang_cl -fuse-ld=lld --vfsoverlay %s -### -- %s 2>&1 | FileCheck --check-prefix=VFSOVERLAY %s |
| 30 |
// VFSOVERLAY: -cc1" |
| 31 |
// VFSOVERLAY: "--vfsoverlay" |
| 32 |
// VFSOVERLAY: lld-link |
| 33 |
// VFSOVERLAY: "/vfsoverlay:{{.*}}" "{{.*}}.obj" |
| 34 |
|
| 35 |
// RUN: %clang --target=arm64ec-pc-windows-msvc -fuse-ld=link -### %s 2>&1 | FileCheck --check-prefix=ARM64EC %s |
| 36 |
// RUN: %clang_cl --target=arm64ec-pc-windows-msvc -fuse-ld=link -### -- %s 2>&1 | FileCheck --check-prefix=ARM64EC %s |
| 37 |
// RUN: %clang_cl -arm64EC -fuse-ld=link -### -- %s 2>&1 | FileCheck --check-prefix=ARM64EC %s |
| 38 |
// ARM64EC: "-machine:arm64ec" |
| 39 |
|
| 40 |
// RUN: %clang --target=arm64ec-pc-windows-msvc -fuse-ld=link -marm64x -### %s 2>&1 | \ |
| 41 |
// RUN: FileCheck --check-prefix=ARM64X %s |
| 42 |
// RUN: %clang --target=aarch64-pc-windows-msvc -fuse-ld=link -marm64x -### %s 2>&1 | \ |
| 43 |
// RUN: FileCheck --check-prefix=ARM64X %s |
| 44 |
// RUN: %clang_cl -marm64x -fuse-ld=link -### -- %s 2>&1 | FileCheck --check-prefix=ARM64X %s |
| 45 |
// RUN: %clang_cl -arm64EC -marm64x -fuse-ld=link -### -- %s 2>&1 | FileCheck --check-prefix=ARM64X %s |
| 46 |
// ARM64X: "-machine:arm64x" |
| 47 |
|
| 48 |
// RUN: not %clang --target=x86_64-linux-gnu -marm64x -### %s 2>&1 | FileCheck --check-prefix=HYBRID-ERR %s |
| 49 |
// HYBRID-ERR: error: unsupported option '-marm64x' for target 'x86_64-linux-gnu' |
| 50 |
|
| 51 |
// RUN: %clang -c -marm64x --target=arm64ec-pc-windows-msvc -fuse-ld=link -### %s 2>&1 | \ |
| 52 |
// RUN: FileCheck --check-prefix=HYBRID-WARN %s |
| 53 |
// HYBRID-WARN: warning: argument unused during compilation: '-marm64x' [-Wunused-command-line-argument] |