[PATCH] Add option to switch off putting header modules into the dependency file.
Richard Smith
richard at metafoo.co.uk
Tue Mar 17 11:03:50 PDT 2015
As a driver flag, this should have a -f form as well as the -fno- form.
On 17 Mar 2015 6:42 am, "Manuel Klimek" <klimek at google.com> wrote:
> Hi rsmith, djasper,
>
> http://reviews.llvm.org/D8378
>
> Files:
> include/clang/Driver/Options.td
> lib/Driver/Tools.cpp
> test/Driver/pch-deps.c
>
> Index: include/clang/Driver/Options.td
> ===================================================================
> --- include/clang/Driver/Options.td
> +++ include/clang/Driver/Options.td
> @@ -770,6 +770,8 @@
> Flags<[DriverOption]>;
> def fimplicit_modules : Flag <["-"], "fimplicit-modules">, Group<f_Group>,
> Flags<[DriverOption]>;
> +def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">,
> Group<f_Group>,
> + Flags<[DriverOption]>;
> def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>;
> def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">,
> Group<f_Group>;
> def fno_delayed_template_parsing : Flag<["-"],
> "fno-delayed-template-parsing">, Group<f_Group>;
> Index: lib/Driver/Tools.cpp
> ===================================================================
> --- lib/Driver/Tools.cpp
> +++ lib/Driver/Tools.cpp
> @@ -325,7 +325,8 @@
> A->getOption().matches(options::OPT_MD))
> CmdArgs.push_back("-sys-header-deps");
>
> - if (isa<PrecompileJobAction>(JA))
> + if (isa<PrecompileJobAction>(JA) &&
> + !Args.hasArg(options::OPT_fno_module_file_deps))
> CmdArgs.push_back("-module-file-deps");
> }
>
> Index: test/Driver/pch-deps.c
> ===================================================================
> --- test/Driver/pch-deps.c
> +++ test/Driver/pch-deps.c
> @@ -8,3 +8,8 @@
> // RUN: FileCheck %s -check-prefix=CHECK-NOPCH -input-file=%t
> // CHECK-NOPCH: -dependency-file
> // CHECK-NOPCH-NOT: -module-file-deps
> +
> +// RUN: %clang -x c-header %s -o %t.pch -MMD -MT dependencies -MF %t.d
> -fno-module-file-deps -### 2> %t
> +// RUN: FileCheck %s -check-prefix=CHECK-EXPLICIT-NOPCH -input-file=%t
> +// CHECK-EXPLICIT-NOPCH: -dependency-file
> +// CHECK-EXPLICIT-NOPCH-NOT: -module-file-deps
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150317/aa3bc8b3/attachment.html>
More information about the cfe-commits
mailing list