Skip to content

Commit

Permalink
Use dummy value for asm when absent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rgrinberg committed Mar 20, 2018
1 parent f5f151d commit d2c85e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ocaml-config/ocaml_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2c85e3

Please sign in to comment.