Page MenuHomePhabricator

[LLVM] Allow modulemap installation
ClosedPublic

Authored by EricWF on Oct 22 2018, 9:55 AM.

Details

Summary

Currently we can't install the modulemaps provided by LLVM, since they are not structured to support headers generated as part of the build (ex. llvm/IR/Attributes.gen).
This patch restructures the module maps in order to support installation.

Modules containing generated headers are defined in the new module.extern.modulemap file, and are referenced from the main module.modulemap using extern module. There are two versions of the module.extern.modulemap file; one used when building and another, module.install.modulemap, which is re-named during installation.

Users can opt-into module map installation using -DLLVM_INSTALL_MODULEMAPS=ON. The default value is OFF due to llvm.org/PR31905.

Diff Detail

Repository
rL LLVM

Event Timeline

EricWF created this revision.Oct 22 2018, 9:55 AM

Ping. If this doesn't get any attention within a week, I'll land it for post-commit review.

Thx, for doing this. Are you planning to do a follow up for Clang? I have been hacking this myself locally.

EricWF accepted this revision.Nov 21 2018, 12:04 PM

Thx, for doing this. Are you planning to do a follow up for Clang? I have been hacking this myself locally.

I hadn't planned on it (I don't strictly need it for my use case), but I'll look into a follow up commit.

Accepting for post-commit review.

This revision is now accepted and ready to land.Nov 21 2018, 12:04 PM
This revision was automatically updated to reflect the committed changes.