From: Stephane Glondu Date: Thu, 3 Sep 2020 13:21:10 +0000 (+0200) Subject: Trigger -output-complete-exe on -custom with an environment variable X-Git-Tag: archive/raspbian/5.3.0-2+rpi1^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=45945256323cd4a12a14678d97a8a675818c74fc;p=ocaml.git Trigger -output-complete-exe on -custom with an environment variable Gbp-Pq: Name 0002-Trigger-output-complete-exe-on-custom-with-an-enviro.patch --- diff --git a/driver/main_args.ml b/driver/main_args.ml index ea07d15c..79724274 100644 --- a/driver/main_args.ml +++ b/driver/main_args.ml @@ -1920,7 +1920,6 @@ third-party libraries such as Lwt, but with a different API." include Core include Compiler let _compat_32 = set bytecode_compatible_32 - let _custom = set custom_runtime let _dcamlprimc = set keep_camlprimc_file let _dinstr = set dump_instr let _dllib s = Compenv.defer (ProcessDLLs (Misc.rev_split_words s)) @@ -1939,6 +1938,15 @@ third-party libraries such as Lwt, but with a different API." let _use_runtime s = use_runtime := s let _v () = Compenv.print_version_and_library "compiler" let _vmthread () = Compenv.fatal vmthread_removed_message + let _custom () = + if + match Sys.getenv_opt "OCAML_CUSTOM_USE_OUTPUT_COMPLETE_EXE" with + | None | Some "" -> false + | Some _ -> true + then + _output_complete_exe () + else + set custom_runtime () end end