xref: /llvm-project/flang/test/Driver/xlinker.f90 (revision 5f74671c85877e03622e8d308aee15ed73ccee7c)
1*5f74671cSTarun Prabhu! RUN: %flang -### --target=ppc64le-linux-gnu -Xlinker -rpath -Xlinker /not/a/real/path %s 2>&1 | FileCheck %s --check-prefixes=UNIX
2*5f74671cSTarun Prabhu! RUN: %flang -### --target=aarch64-apple-darwin -Xlinker -rpath -Xlinker /not/a/real/path %s 2>&1 | FileCheck %s --check-prefixes=UNIX
3*5f74671cSTarun Prabhu! RUN: %flang -### --target=sparc-sun-solaris2.11 -Xlinker -rpath -Xlinker /not/a/real/path %s 2>&1 | FileCheck %s --check-prefixes=UNIX
4*5f74671cSTarun Prabhu! RUN: %flang -### --target=x86_64-unknown-freebsd -Xlinker -rpath -Xlinker /not/a/real/path %s 2>&1 | FileCheck %s --check-prefixes=UNIX
5*5f74671cSTarun Prabhu! RUN: %flang -### --target=x86_64-unknown-netbsd -Xlinker -rpath -Xlinker /not/a/real/path %s 2>&1 | FileCheck %s --check-prefixes=UNIX
6*5f74671cSTarun Prabhu! RUN: %flang -### --target=x86_64-unknown-openbsd -Xlinker -rpath -Xlinker /not/a/real/path %s 2>&1 | FileCheck %s --check-prefixes=UNIX
7*5f74671cSTarun Prabhu! RUN: %flang -### --target=x86_64-unknown-dragonfly -Xlinker -rpath -Xlinker /not/a/real/path %s 2>&1 | FileCheck %s --check-prefixes=UNIX
8*5f74671cSTarun Prabhu! RUN: %flang -### --target=x86_64-unknown-haiku %s -Xlinker -rpath -Xlinker /not/a/real/path 2>&1 | FileCheck %s --check-prefixes=UNIX
9*5f74671cSTarun Prabhu! RUN: %flang -### --target=x86_64-windows-gnu -Xlinker -rpath -Xlinker /not/a/real/path %s 2>&1 | FileCheck %s --check-prefixes=UNIX
10*5f74671cSTarun Prabhu! RUN: %flang -### --target=aarch64-windows-msvc -Xlinker -rpath -Xlinker /not/a/real/path -o obscure.exe %s 2>&1 | FileCheck %s --check-prefixes=MSVC
11*5f74671cSTarun Prabhu
12*5f74671cSTarun Prabhu! UNIX-LABEL: "{{.*}}ld{{(\.exe)?}}"
13*5f74671cSTarun Prabhu! UNIX-SAME: "-rpath" "/not/a/real/path"
14*5f74671cSTarun Prabhu
15*5f74671cSTarun Prabhu! The name of this file contains the word "link" which results in a match on
16*5f74671cSTarun Prabhu! the compiler line as well. Instead look for the final name of the executable
17*5f74671cSTarun Prabhu! to be created since that will only appear in the linker line.
18*5f74671cSTarun Prabhu! MSVC: -out:obscure.exe
19*5f74671cSTarun Prabhu! MSVC-SAME: "-rpath" "/not/a/real/path"
20*5f74671cSTarun Prabhu
21*5f74671cSTarun Prabhuend program
22