[PATCH] Add -fno-modules-implicit-builds.

Manuel Klimek klimek at google.com
Thu Feb 19 04:53:44 PST 2015


================
Comment at: docs/Modules.rst:216
@@ +215,3 @@
+
+``-fmodule-file``
+  Load the given precompiled module file.
----------------
rsmith wrote:
> `-fmodule-file=<FILE>` or similar would be clearer
Done, using <file> to match <directory> above.

================
Comment at: lib/Driver/Tools.cpp:3912-3917
@@ -3911,1 +3911,8 @@
 
+  // -fno-modules-implicit-maps turns off implicitly searching for module
+  // maps.
+  if (!Args.hasFlag(options::OPT_fmodules_implicit_maps,
+                    options::OPT_fno_modules_implicit_maps)) {
+    CmdArgs.push_back("-fno-modules-implicit-maps");
+  }
+
----------------
rsmith wrote:
> Maybe hold back on adding driver support for this flag until after it's renamed?
That is an excellent point, thx.

================
Comment at: test/Modules/Inputs/no-implicit-builds/a.modulemap:1-5
@@ +1,4 @@
+module "a" {
+  use "b"
+}
+extern module "b" "b.modulemap"
\ No newline at end of file

----------------
rsmith wrote:
> This file appears to be unused.
Done.

================
Comment at: test/Modules/no-implicit-builds.cpp:15-16
@@ +14,4 @@
+// Produce an error if a module is found in the cache but implicit modules is off.
+// Note that the command line must match the command line for the first check, otherwise
+// this check might not find the module in the cache and trivially succeed.
+// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t \
----------------
rsmith wrote:
> Add `-Rmodule-build` to the command line for safety / clarity, given this.
Done.

http://reviews.llvm.org/D6707

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list