This is an archive of the discontinued LLVM Phabricator instance.

[driver] Additional ignoring of module-map related flags, if modules are disabled
ClosedPublic

Authored by akyrtzi on Aug 27 2022, 4:22 PM.

Diff Detail

Event Timeline

akyrtzi created this revision.Aug 27 2022, 4:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2022, 4:22 PM
akyrtzi requested review of this revision.Aug 27 2022, 4:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2022, 4:22 PM
jansvoboda11 accepted this revision.Aug 29 2022, 8:06 AM
This revision is now accepted and ready to land.Aug 29 2022, 8:06 AM
MaskRay accepted this revision.Aug 29 2022, 10:08 AM

I sometimes need to debug builds by disabling modules. This behavior will make debugging easier.

clang/test/Driver/modules.m
77–78

You may combine -fmodule-map-file=module.modulemap with this RUN line to avoid introducing a new RUN line (every run makes testsuite slightly slower).

akyrtzi updated this revision to Diff 456483.Aug 29 2022, 3:50 PM

Merge the new RUN line together with the prior 2.

akyrtzi marked an inline comment as done.Aug 29 2022, 3:51 PM
akyrtzi added inline comments.
clang/test/Driver/modules.m
77–78

Good suggestion, I merged the last existing 2 RUN lines along with the new one.

This revision was automatically updated to reflect the committed changes.
akyrtzi marked an inline comment as done.
rsmith added a subscriber: rsmith.EditedAug 30 2022, 6:18 PM

This doesn't look right to me -- we still use module maps when modules are disabled to enforce layering checking, and when -fmodules-local-submodule-visibility is enabled but -fmodules is disabled we'll use them to provide modular semantics without pre-building modules. I'm going to revert.

This doesn't look right to me -- we still use module maps when modules are disabled to enforce layering checking, and when -fmodules-local-submodule-visibility is enabled but -fmodules is disabled we'll use them to provide modular semantics without pre-building modules. I'm going to revert.

Sorry, I wasn't aware of that. Could -fmodule-map-file= be pruned out when -fmodules-local-submodule-visibility or -fmodules-decluse are not enabled?

This doesn't look right to me -- we still use module maps when modules are disabled to enforce layering checking, and when -fmodules-local-submodule-visibility is enabled but -fmodules is disabled we'll use them to provide modular semantics without pre-building modules. I'm going to revert.

Sorry, I wasn't aware of that. Could -fmodule-map-file= be pruned out when -fmodules-local-submodule-visibility or -fmodules-decluse are not enabled?

I've opened https://reviews.llvm.org/D133229 for your consideration, let me know whether this addresses your concerns 🙏