Skip to content

Commit c0250ef

Browse files
committed
resolve flang-new specific flags
1 parent 91ae653 commit c0250ef

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

src/fpm_compiler.F90

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,13 @@ module fpm_compiler
273273
flag_cray_free_form = " -ffree"
274274

275275
character(*), parameter :: &
276-
flag_flang_new_openmp = " -fopenmp"
276+
flag_flang_new_openmp = " -fopenmp", &
277+
flag_flang_new_debug = " -g", &
278+
flag_flang_new_opt = " -O3", &
279+
flag_flang_new_pic = " -fPIC", &
280+
flag_flang_new_free_form = " -ffree-form", &
281+
flag_flang_new_fixed_form = " -ffixed-form", &
282+
flag_flang_new_no_implicit_typing = " -fimplicit-none"
277283

278284
contains
279285

@@ -405,6 +411,11 @@ subroutine get_release_compile_flags(id, flags)
405411
flags = &
406412
flag_lfortran_opt
407413

414+
case(id_flang_new)
415+
flags = &
416+
flag_flang_new_opt//&
417+
flag_flang_new_pic
418+
408419
end select
409420
end subroutine get_release_compile_flags
410421

@@ -500,6 +511,12 @@ subroutine get_debug_compile_flags(id, flags)
500511

501512
case(id_lfortran)
502513
flags = ""
514+
515+
case(id_flang_new)
516+
flags = &
517+
flag_flang_new_debug//&
518+
flag_flang_new_pic
519+
503520
end select
504521
end subroutine get_debug_compile_flags
505522

@@ -512,7 +529,7 @@ pure subroutine set_cpp_preprocessor_flags(id, flags)
512529
select case(id)
513530
case default
514531
flag_cpp_preprocessor = ""
515-
case(id_caf, id_gcc, id_f95, id_nvhpc)
532+
case(id_caf, id_gcc, id_f95, id_nvhpc, id_flang_new)
516533
flag_cpp_preprocessor = "-cpp"
517534
case(id_intel_classic_windows, id_intel_llvm_windows)
518535
flag_cpp_preprocessor = "/fpp"
@@ -700,6 +717,9 @@ function get_feature_flag(self, feature) result(flags)
700717
case(id_cray)
701718
flags = flag_cray_no_implicit_typing
702719

720+
case(id_flang_new)
721+
flags = flag_flang_new_no_implicit_typing
722+
703723
end select
704724

705725
case("implicit-typing")
@@ -747,6 +767,9 @@ function get_feature_flag(self, feature) result(flags)
747767
case(id_cray)
748768
flags = flag_cray_free_form
749769

770+
case(id_flang_new)
771+
flags = flag_flang_new_free_form
772+
750773
end select
751774

752775
case("fixed-form")
@@ -773,6 +796,9 @@ function get_feature_flag(self, feature) result(flags)
773796
case(id_lfortran)
774797
flags = flag_lfortran_fixed_form
775798

799+
case(id_flang_new)
800+
flags = flag_flang_new_fixed_form
801+
776802
end select
777803

778804
case("default-form")

0 commit comments

Comments
 (0)