feat(exec): spill long command lines into response files

This commit is contained in:
sneeker committed 2022-07-20 17:50:41 +00:00
1 parent 1638968aba
commit b52e209067
4 files changed
+53 -5

No files matched your search

+3 -2
View File
@@ -123,7 +123,7 @@ let of_project p =
let tag = if lang_of src = Cxx then "c++" else "cc" in
add
(Graph.make ~id:!n ~tag ~label:src ~cmd ~outs:[ obj ] ~ins:[ src ]
~depfile:(obj ^ ".d") ~ords:gen_headers ());
~depfile:(obj ^ ".d") ~ords:gen_headers ~rsp:(obj ^ ".rsp") ());
obj)
(all_srcs t)
in
@@ -132,7 +132,8 @@ let of_project p =
let ins = objs @ List.map (fun (d : target) -> out_of p d) (deps_of p t) in
let label = match t.kind with Lib | Shared -> Filename.basename out | _ -> t.name in
let outs = out :: Option.to_list (implib_of p t) in
add (Graph.make ~id:!n ~tag ~label ~cmd:(link_cmd p t objs) ~outs ~ins ());
add
(Graph.make ~id:!n ~tag ~label ~cmd:(link_cmd p t objs) ~outs ~ins ~rsp:(out ^ ".rsp") ());
Hashtbl.replace outputs t.name (!n - 1))
p.targets;
{ g = Graph.build (List.rev !nodes); outputs; p }