This is an archive of the discontinued LLVM Phabricator instance.

[Modules] Allow modulemap path change for implicitly built modules
Needs ReviewPublic

Authored by yamaguchi on Jan 8 2019, 6:42 AM.



Previous code was comparing the location of "modulemap which
is currently loaded and gives a definition of current module"
and "the location of the modulemap where the current implicit module was built".

This check was problematic for the usecase when installing modulemaps and prebuilt pcms
to other (e.g install) directories.

Event Timeline

yamaguchi created this revision.Jan 8 2019, 6:42 AM

No doubt @rsmith will have a more nuanced/accurate opinion on this than I do, but I would've thought the point of implicit modules is that they don't get moved around & it sounds like that's what this patch is suggesting/supporting, but maybe I haven't understood it fully?

The prebuilt PCMs you're referring to, are they built explicitly or implicitly?

We have both explicitly and implicitly prebuilt modules, but this patch only relates to implicit ones. I agree that our usecase is a bit unique where we're installing and distributing implicitly built pcm, but I also imagine there might be a usecase where you built implicit pcms in some directory and want to reuse them somehow from other locations. If it doesn't make sense to be upstream, this can stay in our fork.