From 77cfb9ec54a11722800ccdca29cf4a6b24964f73 Mon Sep 17 00:00:00 2001 From: Etienne Millon Date: Mon, 6 Feb 2023 10:43:26 +0100 Subject: [PATCH] Use Dyn Signed-off-by: Etienne Millon --- src/dune_rules/ctypes/ctypes_rules.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dune_rules/ctypes/ctypes_rules.ml b/src/dune_rules/ctypes/ctypes_rules.ml index a79b510a3ce0..7d67280324b4 100644 --- a/src/dune_rules/ctypes/ctypes_rules.ml +++ b/src/dune_rules/ctypes/ctypes_rules.ml @@ -218,10 +218,13 @@ let build_c_program ~foreign_archives_deps ~sctx ~dir ~source_files ~scope in let action = if version >= (0, 3) then + let of_action_builder l : _ Command.Args.t = + Dyn (Action_builder.map l ~f:(fun l -> Command.Args.As l)) + in let args : _ Command.Args.t list = - [ Expand (fun ~dir:_ -> with_user_and_std_flags) - ; Expand (fun ~dir:_ -> cflags) - ; Expand (fun ~dir:_ -> Resolve.Memo.read include_args) + [ of_action_builder with_user_and_std_flags + ; of_action_builder cflags + ; of_action_builder (Resolve.Memo.read include_args) ; Deps (List.map ~f:(fun s -> Path.relative (Path.build dir) s)