aboutsummaryrefslogtreecommitdiff
path: root/flang/test/Driver/dependent-lib.f90
diff options
context:
space:
mode:
Diffstat (limited to 'flang/test/Driver/dependent-lib.f90')
-rw-r--r--flang/test/Driver/dependent-lib.f9016
1 files changed, 16 insertions, 0 deletions
diff --git a/flang/test/Driver/dependent-lib.f90 b/flang/test/Driver/dependent-lib.f90
new file mode 100644
index 0000000..39c94c6
--- /dev/null
+++ b/flang/test/Driver/dependent-lib.f90
@@ -0,0 +1,16 @@
+! REQUIRES aarch64-registered-target && x86-registered-target
+! DEFINE: %{triple} =
+! DEFINE: %{compile} = %flang_fc1 -emit-mlir -triple %{triple} --dependent-lib=libtest %s -o - 2>&1
+! REDEFINE: %{triple} = aarch64-pc-windows-msvc
+! RUN: %{compile} | FileCheck %s
+! REDEFINE: %{triple} = x86_64-pc-windows-msvc
+! RUN: %{compile} | FileCheck %s
+! REDEFINE: %{triple} = x86_64-linux-unknown-gnu
+! RUN: not %{compile} | FileCheck %s --check-prefixes=CHECK-NOWIN
+! REDEFINE: %{triple} = aarch64-apple-darwin
+! RUN: not %{compile} | FileCheck %s --check-prefixes=CHECK-NOWIN
+
+! CHECK: llvm.linker_options ["/DEFAULTLIB:", "libtest"]
+program test
+end program test
+! CHECK-NOWIN: --dependent-lib is only supported on Windows