From d2c85e332995f61a0763cab7b4e14dbd6bca76b1 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 21 Mar 2018 00:01:31 +0800 Subject: [PATCH] Use dummy value for asm when absent On bytecode only systems, this parameter may be absent. We use a dummy in such situations. A dummy value is used so that users do not get immediate erros when using an absent value. --- src/ocaml-config/ocaml_config.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ocaml-config/ocaml_config.ml b/src/ocaml-config/ocaml_config.ml index 1e6c9d26..a6a30f82 100644 --- a/src/ocaml-config/ocaml_config.ml +++ b/src/ocaml-config/ocaml_config.ml @@ -314,10 +314,13 @@ let make vars = let architecture = get vars "architecture" in let model = get vars "model" in let system = get vars "system" in - let asm = get_prog_and_args vars "asm" in let asm_cfi_supported = get_bool vars "asm_cfi_supported" in let with_frame_pointers = get_bool vars "with_frame_pointers" in - + let asm = + match get_prog_and_args_opt vars "asm" with + | Some asm -> asm + | None -> { prog = "asm-not-found-in-ocaml-config"; args = [] } + in let word_size = match get_int_opt vars "word_size" with | Some n -> n