This is an archive of the discontinued LLVM Phabricator instance.

[clang][modules] Infer framework modules in explicit builds
ClosedPublic

Authored by jansvoboda11 on Nov 15 2021, 3:46 AM.

Details

Summary

This patch enables inferring framework modules in explicit builds in all contexts. Until now, inferring framework modules only worked with -fimplicit-module-maps due to this block of code:

// HeaderSearch::loadFrameworkModule
  case LMM_InvalidModuleMap:
    // Try to infer a module map from the framework directory.
    if (HSOpts->ImplicitModuleMaps)
      ModMap.inferFrameworkModule(Dir, IsSystem, /*Parent=*/nullptr);
    break;

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.Nov 15 2021, 3:46 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2021, 3:46 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Bigcheese accepted this revision.Nov 18 2021, 8:32 AM

I think this makes sense to do given that you need to explicitly opt into inferred modules anyway. This isn't implicitly finding module maps, as we already have a module map with framework module *.

This revision is now accepted and ready to land.Nov 18 2021, 8:32 AM
jansvoboda11 edited the summary of this revision. (Show Details)Feb 23 2022, 5:45 AM
jansvoboda11 edited the summary of this revision. (Show Details)

Remove changes related to dependency scanning

This revision was landed with ongoing or failed builds.Feb 23 2022, 5:46 AM
This revision was automatically updated to reflect the committed changes.