compnerd created this revision.
compnerd added a reviewer: ldionne.
Herald added subscribers: libcxx-commits, dexonsmith.
Herald added a project: libc++.
Herald added a reviewer: libc++.

When building with a non-modularized C runtime, `csignal` would claim `time.h` 
and thus `timespec` rather than `ctime`.  Adjust the modulemap to ensure that 
`ctime` claims `timespec`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77697

Files:
  libcxx/include/module.modulemap


Index: libcxx/include/module.modulemap
===================================================================
--- libcxx/include/module.modulemap
+++ libcxx/include/module.modulemap
@@ -157,6 +157,13 @@
       header "csetjmp"
       export *
     }
+    // NOTE: ensure that `ctime` preceeds `csignal` as otherwise, for a
+    // non-modular C runtime, you would end up with `csignal` providing time
+    // functions.
+    module ctime {
+      header "ctime"
+      export *
+    }
     module csignal {
       header "csignal"
       export *
@@ -197,10 +204,6 @@
       export cmath
       export *
     }
-    module ctime {
-      header "ctime"
-      export *
-    }
     // FIXME: <cuchar> is missing.
     module cwchar {
       header "cwchar"


Index: libcxx/include/module.modulemap
===================================================================
--- libcxx/include/module.modulemap
+++ libcxx/include/module.modulemap
@@ -157,6 +157,13 @@
       header "csetjmp"
       export *
     }
+    // NOTE: ensure that `ctime` preceeds `csignal` as otherwise, for a
+    // non-modular C runtime, you would end up with `csignal` providing time
+    // functions.
+    module ctime {
+      header "ctime"
+      export *
+    }
     module csignal {
       header "csignal"
       export *
@@ -197,10 +204,6 @@
       export cmath
       export *
     }
-    module ctime {
-      header "ctime"
-      export *
-    }
     // FIXME: <cuchar> is missing.
     module cwchar {
       header "cwchar"
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D77697: l... Saleem Abdulrasool via Phabricator via cfe-commits

Reply via email to