Skip to content

Commit

Permalink
[cxxmodules] Don't complain when modulemap for implicit modules has c…
Browse files Browse the repository at this point in the history
…hanged

This patch (also) aims to make runtime module installable.

This part of code in Clang is comparing the location of "modulemap which
is currently loaded and gives a definition of current module (say, stl)
and "the location of the modulemap where the current implicit module (like stl) was built".

This was problematic for CMSSW, as they should install modulemaps
and prebuilt pcms to other directory. stl and libc pcms should be
prebuilt, installed and used from installed directory, so this check is
redundant for that usecase.
  • Loading branch information
yamaguchi1024 authored and vgvassilev committed Feb 25, 2021
1 parent a5e8afb commit ca5eb99
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3887,7 +3887,8 @@ ASTReader::ReadModuleMapFileBlock(RecordData &Record, ModuleFile &F,

// Check the primary module map file.
const FileEntry *StoredModMap = FileMgr.getFile(F.ModuleMapPath);
if (StoredModMap == nullptr || StoredModMap != ModMap) {
if (!PP.getPreprocessorOpts().DisablePCHValidation &&
(StoredModMap == nullptr || StoredModMap != ModMap)) {
assert(ModMap && "found module is missing module map file");
assert(ImportedBy && "top-level import should be verified");
if ((ClientLoadCapabilities & ARR_OutOfDate) == 0)
Expand Down

0 comments on commit ca5eb99

Please sign in to comment.