llvm-project/flang/test/Driver/mlink-builtin-bc.f90
Jan Leyonberg b75e7c61ff
[flang] Add -mlink-builtin-bitcode option to fc1 (#94763)
This patch enables the -mlink-builtin-bitcode flag in fc1 so that
bitcode libraries can be linked in. This is needed for OpenMP offloading
libraries.
2024-06-17 09:31:15 -04:00

16 lines
449 B
Fortran

! Test -mlink-builtin-bitcode flag
! RUN: %flang -emit-llvm -c -o %t.bc %S/Inputs/libfun.f90
! RUN: %flang_fc1 -emit-llvm -o - -mlink-builtin-bitcode %t.bc %s 2>&1 | FileCheck %s
! CHECK: define internal void @libfun_
! RUN: not %flang_fc1 -emit-llvm -o - -mlink-builtin-bitcode %no-%t.bc %s 2>&1 | FileCheck %s --check-prefix=ERROR
! ERROR: error: could not open {{.*}}.bc
external libfun
parameter(i=1)
integer :: j
call libfun(j)
end program