]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Context: move using_precompiled_header 541/head
authorThomas Otto <thomas.otto@pdv-fs.de>
Fri, 24 Jan 2020 19:23:14 +0000 (20:23 +0100)
committerThomas Otto <thomas.otto@pdv-fs.de>
Thu, 13 Feb 2020 22:51:43 +0000 (23:51 +0100)
src/ccache.cpp
src/legacy_globals.cpp
src/legacy_globals.hpp
unittest/test_argument_processing.cpp

index 96c1356455b9aea0be7b795153a6a0210aa65a91..528ccbec5c3274034f7bdd59c783e73209e50d3d 100644 (file)
@@ -1800,7 +1800,7 @@ calculate_result_name(Context& ctx,
     // they are going to have any effect at all. For precompiled headers this
     // might not be the case.
     if (!direct_mode && !output_is_precompiled_header
-        && !using_precompiled_header) {
+        && !ctx.args_info.using_precompiled_header) {
       if (compopt_affects_cpp(args->argv[i])) {
         if (compopt_takes_arg(args->argv[i])) {
           i++;
@@ -3705,7 +3705,6 @@ do_cache_compilation(Context& ctx, char* argv[])
   }
 
   output_is_precompiled_header = ctx.args_info.output_is_precompiled_header;
-  using_precompiled_header = ctx.args_info.using_precompiled_header;
 
   arch_args_size = ctx.args_info.arch_args_size;
   for (size_t i = 0; i < ctx.args_info.arch_args_size; ++i) {
index fe4af6b3bc9ba265ffdd13177241525dd3666418..19b72e0ed3dc82d84aeeeeeb4160e3dfbceb03aa 100644 (file)
@@ -78,10 +78,6 @@ bool output_is_precompiled_header = false;
 // should hard-depend on it if possible.
 enum guessed_compiler guessed_compiler = GUESSED_UNKNOWN;
 
-// Whether we are using a precompiled header (either via -include, #include or
-// clang's -include-pch or -include-pth).
-bool using_precompiled_header = false;
-
 // The .gch/.pch/.pth file used for compilation.
 char* included_pch_file = nullptr;
 
index bc283a1434fa6d993316222a89d15396aadc2fd9..5719426ad25fef7977da74b85a19fed308e8b11e 100644 (file)
@@ -64,6 +64,4 @@ extern bool output_is_precompiled_header;
 
 extern enum guessed_compiler guessed_compiler;
 
-extern bool using_precompiled_header;
-
 extern char* included_pch_file;
index 0416322c2928ae571a5287b3785432a4b4c7fcd9..6171f9bd4a85459e81206f30216ec03bee40f757 100644 (file)
@@ -85,7 +85,6 @@ cc_process_args(Context& ctx,
                                  compiler_args);
 
   output_is_precompiled_header = ctx.args_info.output_is_precompiled_header;
-  using_precompiled_header = ctx.args_info.using_precompiled_header;
 
   return success;
 }