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
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"
9 // BASIC-NOT: subsystem:console"
11 // RUN: %clang --target=i686-pc-windows-msvc -shared -o a.dll -fuse-ld=link -### %s 2>&1 | FileCheck --check-prefix=DLL %s
13 // DLL-SAME: "-out:a.dll"
14 // DLL-SAME: "-defaultlib:libcmt" "-defaultlib:oldnames"
15 // DLL-SAME: "-nologo" "-dll"
17 // RUN: %clang_cl /Brepro -fuse-ld=link -### -- %s 2>&1 | FileCheck --check-prefix=REPRO %s
19 // REPRO-SAME: "-out:msvc-link.exe"
20 // REPRO-SAME: "-nologo"
21 // REPRO-SAME: "-Brepro"
23 // RUN: %clang_cl /Brepro- -fuse-ld=link -### -- %s 2>&1 | FileCheck --check-prefix=NOREPRO %s
25 // NOREPRO-SAME: "-out:msvc-link.exe"
26 // NOREPRO-SAME: "-nologo"
27 // NOREPRO-NOT: "-Brepro"
29 // RUN: %clang_cl -fuse-ld=lld --vfsoverlay %s -### -- %s 2>&1 | FileCheck --check-prefix=VFSOVERLAY %s
31 // VFSOVERLAY: "--vfsoverlay"
32 // VFSOVERLAY: lld-link
33 // VFSOVERLAY: "/vfsoverlay:{{.*}}" "{{.*}}.obj"
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"
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"
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'
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]