diff --git a/src/dune_rules/compilation_context.ml b/src/dune_rules/compilation_context.ml index 8bb1be96cd0..3abe26cefd2 100644 --- a/src/dune_rules/compilation_context.ml +++ b/src/dune_rules/compilation_context.ml @@ -304,7 +304,11 @@ let for_module_generated_at_link_time cctx ~requires ~module_ = } ;; -let for_wrapped_compat t = { t with includes = Includes.empty; stdlib = None } +let for_wrapped_compat t = + (* See #10689 *) + let flags = Ocaml_flags.append_common t.flags [ "-w"; "-53" ] in + { t with includes = Includes.empty; stdlib = None; flags } +;; let for_plugin_executable t ~embed_in_plugin_libraries = let libs = Scope.libs t.scope in