[PATCH] D51568: [modules] Add `-fdisable-module-directory` flag for relocatable modules
Andrew Gallagher via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 1 00:50:10 PDT 2018
andrewjcg created this revision.
Herald added a subscriber: cfe-commits.
Currently, modules built using module map files embed the path to the directory
that houses their inputs (e.g. headers and module map file) into the output
module file. This path is embedded as an absolute path and the various input
files are either relativized to this path (if they are underneath it) or also
embedded as an absolute path.
This adds a flag which disables use of this absolute module directory path and
instead writes out paths into the module unmodified (e.g. if they were specified
on the command line as relative paths to the CWD, then they remain relative to
the CWD). This allows building modules without any absolute paths, allowing them
to be built and shared between different working directories.
Repository:
rC Clang
https://reviews.llvm.org/D51568
Files:
include/clang/Driver/CC1Options.td
include/clang/Lex/HeaderSearchOptions.h
lib/Frontend/CompilerInvocation.cpp
lib/Serialization/ASTWriter.cpp
test/Modules/relocatable-modules.modulemap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51568.163619.patch
Type: text/x-patch
Size: 6950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180901/e3150687/attachment-0001.bin>
More information about the cfe-commits
mailing list