[PATCH] D51568: [modules] Add `-fno-absolute-module-directory` flag for relocatable modules

Andrew Gallagher via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 24 09:56:37 PDT 2018


andrewjcg updated this revision to Diff 166709.
andrewjcg added a comment.

Dropping the module directory entirely and fully resolving paths on serialization
broke some things during deserialization, specifically when the deserializer wanted
to update paths to use an alternate module directory.

This switches to a different strategy of only relativizing the paths that are
actually under the module home dir, and adding a bit to the serialized paths to
indiciate this.  This bit is read on deserializiation to determine whether the
path is resolved against the module directory or not.


Repository:
  rC Clang

https://reviews.llvm.org/D51568

Files:
  include/clang/Driver/CC1Options.td
  include/clang/Lex/HeaderSearchOptions.h
  include/clang/Serialization/ASTReader.h
  include/clang/Serialization/ASTWriter.h
  lib/Frontend/CompilerInvocation.cpp
  lib/Serialization/ASTReader.cpp
  lib/Serialization/ASTReaderInternals.h
  lib/Serialization/ASTWriter.cpp
  lib/Serialization/GlobalModuleIndex.cpp
  test/Modules/relocatable-modules.modulemap

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51568.166709.patch
Type: text/x-patch
Size: 16558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180924/988d3d9a/attachment-0001.bin>


More information about the cfe-commits mailing list