]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Make implementation of /Tc and /Tp actually work
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 4 Feb 2024 08:26:26 +0000 (09:26 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 4 Feb 2024 08:42:32 +0000 (09:42 +0100)
In addition to 7b8aaf562feb.

src/argprocessing.cpp

index f1a11ab3ab597f5c2c97bbc94bf74e3a7edf6149..b823290d6dc8153cb06b4be3e04fd672c96b4948 100644 (file)
@@ -562,11 +562,12 @@ process_option_arg(const Context& ctx,
       return Statistic::none;
     }
 
-    // MSVC /Tc and /Tp options for specifying input file.
+    // MSVC /Tc and /Tp options with no space for specifying input file.
     if (arg.length() > 3 && util::starts_with(arg, "-T")
         && (arg[2] == 'c' || arg[2] == 'p')) {
-      size_t file_index = arg[3] == ' ' ? 4 : 3;
-      state.input_files.emplace_back(arg.substr(file_index));
+      state.common_args.push_back(args[i]);
+      state.input_files.emplace_back(arg.substr(3));
+      return Statistic::none;
     }
   }