Introduce '-fmodules-user-build-path' which accepts the "canonical" path to a user workspace build.
This is used to avoid conflicts with user modules with the same name from different workspaces.
rdar://16042513
llvm-svn: 202683
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 50ad7e6..911b6a0 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -3366,6 +3366,13 @@
CmdArgs.push_back(Args.MakeArgString(DefaultModuleCache));
}
+ if (Arg *A = Args.getLastArg(options::OPT_fmodules_user_build_path)) {
+ A->claim();
+ if (HaveModules) {
+ A->render(Args, CmdArgs);
+ }
+ }
+
// Pass through all -fmodules-ignore-macro arguments.
Args.AddAllArgs(CmdArgs, options::OPT_fmodules_ignore_macro);
Args.AddLastArg(CmdArgs, options::OPT_fmodules_prune_interval);