[PATCH] Add -fno-modules-implicit-builds.
Richard Smith
richard at metafoo.co.uk
Wed Feb 18 19:24:51 PST 2015
================
Comment at: docs/Modules.rst:216
@@ +215,3 @@
+
+``-fmodule-file``
+ Load the given precompiled module file.
----------------
`-fmodule-file=<FILE>` or similar would be clearer
================
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");
+ }
+
----------------
Maybe hold back on adding driver support for this flag until after it's renamed?
================
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
----------------
This file appears to be unused.
================
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 \
----------------
Add `-Rmodule-build` to the command line for safety / clarity, given this.
http://reviews.llvm.org/D6707
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list