Skip to content

Commit 072e3d5

Browse files
authored
Merge branch 'fortran-lang:main' into flang_new_first
2 parents c0250ef + c558772 commit 072e3d5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/fpm_compiler.F90

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,17 @@ function get_default_flags(self, release) result(flags)
300300
! Append position-independent code (PIC) flag, that is necessary
301301
! building shared libraries
302302
select case (self%id)
303-
case (id_gcc, id_f95, id_caf, id_flang, id_flang_new, id_f18, id_lfortran, &
303+
case (id_gcc, id_f95, id_caf, id_flang, id_f18, id_lfortran, &
304304
id_intel_classic_nix, id_intel_classic_mac, id_intel_llvm_nix, &
305305
id_pgi, id_nvhpc, id_nag, id_cray, id_ibmxl)
306306
pic_flag = " -fPIC"
307+
case (id_flang_new)
308+
! flang-new doesn't support -fPIC on Windows MSVC target
309+
if (get_os_type() == OS_WINDOWS) then
310+
pic_flag = ""
311+
else
312+
pic_flag = " -fPIC"
313+
end if
307314
case (id_intel_classic_windows, id_intel_llvm_windows)
308315
pic_flag = "" ! Windows does not use -fPIC
309316
case default

0 commit comments

Comments
 (0)