xref: /llvm-project/flang/test/Driver/dependent-lib.f90 (revision 5e36c64cb6e8f9c6c0c2db8a9a7120b28fbc36df)
1! REQUIRES: aarch64-registered-target && x86-registered-target
2! DEFINE: %{triple} =
3! DEFINE: %{compile} = %flang_fc1 -emit-mlir -triple %{triple} --dependent-lib=libtest %s -o - 2>&1
4! REDEFINE: %{triple} = aarch64-pc-windows-msvc
5! RUN: %{compile} | FileCheck %s
6! REDEFINE: %{triple} = x86_64-pc-windows-msvc
7! RUN: %{compile} | FileCheck %s
8! REDEFINE: %{triple} = x86_64-linux-unknown-gnu
9! RUN: not %{compile} | FileCheck %s --check-prefixes=CHECK-NOWIN
10! REDEFINE: %{triple} = aarch64-apple-darwin
11! RUN: not %{compile} | FileCheck %s --check-prefixes=CHECK-NOWIN
12
13! CHECK: llvm.linker_options ["/DEFAULTLIB:libtest"]
14program test
15end program test
16! CHECK-NOWIN: --dependent-lib is only supported on Windows
17