diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-08-18 17:42:15 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-08-18 17:42:15 +0000 |
commit | 11f2a477721c416abb3015b0a06d28869211bf3e (patch) | |
tree | 3cddfde033f1fa7ff40cec786759a63eb004f59c /clang/lib/Driver/Tools.cpp | |
parent | c948d182e12c94585e8996b8d432ba6427fdd12c (diff) | |
download | bcm5719-llvm-11f2a477721c416abb3015b0a06d28869211bf3e.tar.gz bcm5719-llvm-11f2a477721c416abb3015b0a06d28869211bf3e.zip |
Module: add -fprebuilt-module-path to support loading prebuilt modules.
In this mode, there is no need to load any module map and the programmer can
simply use "@import" syntax to load the module directly from a prebuilt
module path. When loading from prebuilt module path, we don't support
rebuilding of the module files and we ignore compatible configuration
mismatches.
rdar://27290316
Differential Revision: http://reviews.llvm.org/D23125
llvm-svn: 279096
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 12d5eabafa1..a814df3c64c 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -5405,6 +5405,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Args.MakeArgString(Path)); } + if (HaveModules) { + // -fprebuilt-module-path specifies where to load the prebuilt module files. + for (const Arg *A : Args.filtered(options::OPT_fprebuilt_module_path)) + CmdArgs.push_back(Args.MakeArgString( + std::string("-fprebuilt-module-path=") + A->getValue())); + } + // -fmodule-name specifies the module that is currently being built (or // used for header checking by -fmodule-maps). Args.AddLastArg(CmdArgs, options::OPT_fmodule_name_EQ); |