[PATCH] D135345: [libunwind] Add module maps for libunwind

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 16:15:19 PDT 2022


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

In D135345#3883690 <https://reviews.llvm.org/D135345#3883690>, @iana wrote:

> In D135345#3880719 <https://reviews.llvm.org/D135345#3880719>, @MaskRay wrote:
>
>> Good point about libunwind headers are usually installed in /usr/include , shared with other system headers.
>> Is there any information how Mach-O platforms use the modulemap file?
>> IIUC non-Mach-O platforms will probably not benefit from `libunwind.modulemap`.
>
> In the Apple platforms (I assume that's what you mean by Mach-O), it will consume these module maps from the usr/include/module.modulemap file that the OS provides like this.
>
>   extern module libunwind "libunwind.modulemap"
>   extern module unwind "libunwind.modulemap"
>   
>   module Darwin [system] {
>   ...
>   }
>   // and so on and so forth
>
> Non-Apple platforms would do the same from their usr/include/module.modulemap file, if any other platform has that. (I don't know if Linux or Windows or any other platform has modularized their OS headers)

OK, thanks. I see that several projects including libc++/libc++abi install `module.modulemap` files. If other platforms want to use module.modulemap, they can use the export syntax.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135345/new/

https://reviews.llvm.org/D135345



More information about the llvm-commits mailing list