File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,13 @@ let load_and_preprocess ~all_cppflags filename =
7272 let suf =
7373 begin match List. findi (fun i e -> e = " -o" ) arguments with
7474 | (o_i , _ ) ->
75- begin match List. drop o_i arguments with
76- | (_ :: o_file :: arguments_tl ) -> preprocessed_file :: arguments_tl
75+ begin match List. split_at o_i arguments with
76+ | (arguments_init , o_file :: arguments_tl ) -> arguments_init @ preprocessed_file :: arguments_tl
7777 | _ -> failwith (" CompilationDatabase.preprocess: no argument found for -o option for " ^ file)
7878 end
79- | exception Not_found -> [preprocessed_file]
79+ | exception Not_found -> arguments @ " -o " :: [preprocessed_file]
8080 end in
81- all_cppflags @ " -E" :: " -MMD" :: " -MT" :: file :: arguments @ " -o " :: suf in
81+ all_cppflags @ " -E" :: " -MMD" :: " -MT" :: file :: suf in
8282 begin match arguments with
8383 | (arguments_program :: arguments ) -> Filename. quote_command arguments_program preprocess_arguments
8484 | _ -> failwith " CompilationDatabase.preprocess: no program found for " ^ file
You can’t perform that action at this time.
0 commit comments