[Openmp-commits] [openmp] [WIP][flang] Compile proper `omp_lib.mod` from the `openmp/src/include` sources (PR #80874)

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Tue Feb 6 12:11:01 PST 2024


https://github.com/jpeyton52 commented:

For Intel Fortran compiler, there would need to be an additional flag during module compilation, -fpp, to enable preprocessing. I think gfortran is OK without the flag (and they use -cpp). I don't know about other Fortran compilers. 

Basically, a two-step process in the CMake where:
1) cmake/config-ix.cmake: add `libomp_check_fortran_flag(-fpp LIBOMP_HAVE_FPP_FORTRAN_FLAG)`
2) `cmake/LibompHandleFlags.cmake`: add `libomp_append(fflags_local -fpp LIBOMP_HAVE_FPP_FORTRAN_FLAG)`

The is a single Fortran flag example (-m32) to see in each file.

https://github.com/llvm/llvm-project/pull/80874


More information about the Openmp-commits mailing list