This is an archive of the discontinued LLVM Phabricator instance.

Fix module map to create a module for the configured header Config/abi-breaking.h
ClosedPublic

Authored by mehdi_amini on Nov 30 2016, 11:13 AM.

Details

Summary

A client of a header that relies on ABI breaking should get the macro
exported there.
Before this, the unittest for Support/Error including Support/Error.h
didn't get the macro exported by the Support module, because the
latter only re-export its submodules and included module, not
textual headers.

Hopefully, it'll also fix the build with local submodule visibility,
since the LLVM_Utils contains two submodules: ADT and Support. They
both include abi-breaking.h that defines a symbol. The textual
inclusion lead to a double definition of the symbol which broke
the parent module.

Event Timeline

mehdi_amini retitled this revision from to Fix module map to create a module for the configured header Config/abi-breaking.h.
mehdi_amini updated this object.
mehdi_amini added reviewers: rsmith, bruno.
bruno accepted this revision.Nov 30 2016, 1:16 PM
bruno edited edge metadata.

LGTM! I would wait on @rsmith input as well.

llvm/include/llvm/module.modulemap.build
6

LLVM_Config_gen => LLVM_Config_ABI_Breaking

This revision is now accepted and ready to land.Nov 30 2016, 1:16 PM
mehdi_amini added inline comments.Nov 30 2016, 1:17 PM
llvm/include/llvm/module.modulemap.build
6

Is used LLVM_Config_gen for generated files, this is not the only header in the build directory and I was wondering if we shouldn't export more? (Not urgent though)

mehdi_amini edited edge metadata.

Rename the module as suggested by Bruno

I'm pushing this and @rsmith can comment post-commit.

This revision was automatically updated to reflect the committed changes.
bruno added a comment.Dec 1 2016, 3:48 PM

Thanks Mehdi