[libc-commits] [clang] [compiler-rt] [flang] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [openmp] [Flang] Move builtin .mod generation into runtimes (Reapply #137828) (PR #171515)

Tarun Prabhu via libc-commits libc-commits at lists.llvm.org
Mon Apr 27 05:20:08 PDT 2026


================
@@ -225,13 +242,27 @@ function (add_flangrt_library name)
     # Minimum required C++ version for Flang-RT, even if CMAKE_CXX_STANDARD is defined to something else.
     target_compile_features(${tgtname} PRIVATE cxx_std_17)
 
+    if (CMAKE_Fortran_COMPILER_ID MATCHES "LLVM")
+      target_compile_options(${tgtname} PRIVATE
+        # Always enable preprocessor regardless of file extension
+        "$<$<COMPILE_LANGUAGE:Fortran>:-cpp>"
+
+        # Missing type descriptors are expected for intrinsic modules
----------------
tarunprabhu wrote:

Will type descriptors always be absent in intrinsic modules? Is this something that might affect end-users as well? This is not related to this PR, but is it worth exposing this as a driver option instead of using `-mmlir`?

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


More information about the libc-commits mailing list