[PATCH] D77697: libc++: adjust modulemap for non-modular C
Saleem Abdulrasool via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 7 18:00:17 PDT 2020
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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77697.255868.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200408/26862a72/attachment.bin>
More information about the cfe-commits
mailing list