@@ -275,13 +275,13 @@ module fpm_compiler
275
275
flag_cray_free_form = " -ffree"
276
276
277
277
character (* ), parameter :: &
278
- flag_flang_new_openmp = " -fopenmp" , &
279
- flag_flang_new_debug = " -g" , &
280
- flag_flang_new_opt = " -O3" , &
281
- flag_flang_new_pic = " -fPIC" , &
282
- flag_flang_new_free_form = " -ffree-form" , &
283
- flag_flang_new_fixed_form = " -ffixed-form" , &
284
- flag_flang_new_no_implicit_typing = " -fimplicit-none"
278
+ flag_flang_openmp = " -fopenmp" , &
279
+ flag_flang_debug = " -g" , &
280
+ flag_flang_opt = " -O3" , &
281
+ flag_flang_pic = " -fPIC" , &
282
+ flag_flang_free_form = " -ffree-form" , &
283
+ flag_flang_fixed_form = " -ffixed-form" , &
284
+ flag_flang_no_implicit_typing = " -fimplicit-none"
285
285
286
286
contains
287
287
@@ -307,7 +307,7 @@ function get_default_flags(self, release) result(flags)
307
307
id_pgi, id_nvhpc, id_nag, id_cray, id_ibmxl)
308
308
pic_flag = " -fPIC"
309
309
case (id_flang)
310
- ! flang-new doesn't support -fPIC on Windows MSVC target
310
+ ! LLVM Flang doesn't support -fPIC on Windows MSVC target
311
311
if (get_os_type() == OS_WINDOWS) then
312
312
pic_flag = " "
313
313
else
@@ -422,8 +422,8 @@ subroutine get_release_compile_flags(id, flags)
422
422
423
423
case (id_flang)
424
424
flags = &
425
- flag_flang_new_opt // &
426
- flag_flang_new_pic
425
+ flag_flang_opt // &
426
+ flag_flang_pic
427
427
428
428
end select
429
429
end subroutine get_release_compile_flags
@@ -523,8 +523,8 @@ subroutine get_debug_compile_flags(id, flags)
523
523
524
524
case (id_flang)
525
525
flags = &
526
- flag_flang_new_debug // &
527
- flag_flang_new_pic
526
+ flag_flang_debug // &
527
+ flag_flang_pic
528
528
529
529
end select
530
530
end subroutine get_debug_compile_flags
@@ -691,7 +691,7 @@ function get_shared_flag(self) result(shared_flag)
691
691
select case (self% id)
692
692
case default
693
693
shared_flag = " -shared"
694
- case (id_gcc, id_f95, id_flang_classic, id_flang , id_lfortran)
694
+ case (id_gcc, id_f95, id_flang, id_flang_classic , id_lfortran)
695
695
shared_flag = " -shared"
696
696
case (id_intel_classic_nix, id_intel_llvm_nix, id_pgi, id_nvhpc)
697
697
shared_flag = " -shared"
@@ -727,7 +727,7 @@ function get_feature_flag(self, feature) result(flags)
727
727
flags = flag_cray_no_implicit_typing
728
728
729
729
case (id_flang)
730
- flags = flag_flang_new_no_implicit_typing
730
+ flags = flag_flang_no_implicit_typing
731
731
732
732
end select
733
733
@@ -756,6 +756,7 @@ function get_feature_flag(self, feature) result(flags)
756
756
end select
757
757
758
758
case (" free-form" )
759
+
759
760
select case (self% id)
760
761
case (id_caf, id_gcc, id_f95)
761
762
flags = flag_gnu_free_form
@@ -777,7 +778,7 @@ function get_feature_flag(self, feature) result(flags)
777
778
flags = flag_cray_free_form
778
779
779
780
case (id_flang)
780
- flags = flag_flang_new_free_form
781
+ flags = flag_flang_free_form
781
782
782
783
end select
783
784
@@ -806,7 +807,7 @@ function get_feature_flag(self, feature) result(flags)
806
807
flags = flag_lfortran_fixed_form
807
808
808
809
case (id_flang)
809
- flags = flag_flang_new_fixed_form
810
+ flags = flag_flang_fixed_form
810
811
811
812
end select
812
813
@@ -1025,26 +1026,21 @@ function match_compiler_type(compiler) result(id)
1025
1026
return
1026
1027
end if
1027
1028
1028
- if (check_compiler(compiler, " flang-new" )) then
1029
- id = id_flang
1030
- return
1031
- end if
1032
-
1033
- if (check_compiler(compiler, " f18" )) then
1034
- id = id_f18
1035
- return
1036
- end if
1037
-
1038
1029
if (check_compiler(compiler, " flang-classic" )) then
1039
1030
id = id_flang_classic
1040
1031
return
1041
1032
end if
1042
1033
1043
- if (check_compiler(compiler, " flang" )) then
1034
+ if (check_compiler(compiler, " flang-new " ) .or. check_compiler(compiler, " flang " )) then
1044
1035
id = id_flang
1045
1036
return
1046
1037
end if
1047
1038
1039
+ if (check_compiler(compiler, " f18" )) then
1040
+ id = id_f18
1041
+ return
1042
+ end if
1043
+
1048
1044
if (check_compiler(compiler, " xlf90" )) then
1049
1045
id = id_ibmxl
1050
1046
return
@@ -1824,8 +1820,8 @@ pure function compiler_id_name(id) result(name)
1824
1820
case (id_pgi); name = " pgfortran"
1825
1821
case (id_nvhpc); name = " nvfortran"
1826
1822
case (id_nag); name = " nagfor"
1827
- case (id_flang_classic); name = " flang"
1828
- case (id_flang); name = " flang-new "
1823
+ case (id_flang_classic); name = " flang-classic "
1824
+ case (id_flang); name = " flang"
1829
1825
case (id_f18); name = " f18"
1830
1826
case (id_ibmxl); name = " xlf90"
1831
1827
case (id_cray); name = " crayftn"
0 commit comments