aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-12-10 03:09:48 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-12-10 03:09:48 +0000
commit9acb99e342376c6269fb70d1e9665c2790b93b12 (patch)
tree62e72141d8eb9828e0cb78f3eff7e4309fdf2060 /clang/lib/Frontend/CompilerInvocation.cpp
parent49475327fffdfb4cde572b5955d7d94d801d84bf (diff)
downloadllvm-9acb99e342376c6269fb70d1e9665c2790b93b12.zip
llvm-9acb99e342376c6269fb70d1e9665c2790b93b12.tar.gz
llvm-9acb99e342376c6269fb70d1e9665c2790b93b12.tar.bz2
Reinstate r223753, reverted in r223759 due to breakage of clang-tools-extra.
Original commit message: [modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1. For files named by -fmodule-map-file=, and files found by 'extern module' directives, this flag specifies that we should resolve filenames relative to the current working directory rather than relative to the directory in which the module map file resides. This is aimed at fixing path handling, in particular for relative -I paths, when building modules that represent components of the current project (rather than libraries installed on the current system, which the current project has as dependencies, where we'd typically expect the module map files to be looked up implicitly). llvm-svn: 223913
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index f016638..5909594 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1003,6 +1003,7 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
Opts.DisableModuleHash = Args.hasArg(OPT_fdisable_module_hash);
// -fmodules implies -fmodule-maps
Opts.ModuleMaps = Args.hasArg(OPT_fmodule_maps) || Args.hasArg(OPT_fmodules);
+ Opts.ModuleMapFileHomeIsCwd = Args.hasArg(OPT_fmodule_map_file_home_is_cwd);
Opts.ModuleCachePruneInterval =
getLastArgIntValue(Args, OPT_fmodules_prune_interval, 7 * 24 * 60 * 60);
Opts.ModuleCachePruneAfter =