@@ -55,12 +55,11 @@ let load_and_preprocess ~all_cppflags filename =
5555 else
5656 let preprocessed_file = Filename. concat preprocessed_dir (Filename. chop_extension (GobFilename. chop_common_prefix database_dir file) ^ " .i" ) in
5757 GobSys. mkdir_parents preprocessed_file;
58- let deps_file = Filename. chop_extension preprocessed_file ^ " .d" in
5958 let preprocess_command = match obj.command, obj.arguments with
6059 | Some command , None ->
6160 (* TODO: extract o_file *)
6261 let command = reroot command in
63- let preprocess_command = Str. replace_first command_program_regexp (" \\ 1 " ^ String. join " " (List. map Filename. quote all_cppflags) ^ " -E -MMD -MT " ^ file ) command in
62+ let preprocess_command = Str. replace_first command_program_regexp (" \\ 1 " ^ String. join " " (List. map Filename. quote all_cppflags) ^ " -E" ) command in
6463 let preprocess_command = Str. replace_first command_o_regexp (" -o " ^ preprocessed_file) preprocess_command in
6564 if preprocess_command = command then (* easier way to check if match was found (and replaced) *)
6665 failwith " CompilationDatabase.preprocess: no -o argument found for " ^ file
@@ -72,7 +71,7 @@ let load_and_preprocess ~all_cppflags filename =
7271 | (o_i , _ ) ->
7372 begin match List. split_at o_i arguments with
7473 | (arguments_program :: arguments_init , _ :: o_file :: arguments_tl ) ->
75- let preprocess_arguments = all_cppflags @ " -E" :: " -MMD " :: " -MT " :: file :: arguments_init @ " -o" :: preprocessed_file :: arguments_tl in
74+ let preprocess_arguments = all_cppflags @ " -E" :: arguments_init @ " -o" :: preprocessed_file :: arguments_tl in
7675 Filename. quote_command arguments_program preprocess_arguments
7776 | _ ->
7877 failwith " CompilationDatabase.preprocess: no -o argument value found for " ^ file
@@ -89,7 +88,6 @@ let load_and_preprocess ~all_cppflags filename =
8988 if GobConfig. get_bool " dbg.verbose" then
9089 Printf. printf " Preprocessing %s\n to %s\n using %s\n in %s\n " file preprocessed_file preprocess_command cwd;
9190 system ~cwd preprocess_command; (* command/arguments might have paths relative to directory *)
92- Preprocessor. parse_makefile_deps deps_file;
9391 Some preprocessed_file
9492 in
9593 parse_file filename
0 commit comments