Skip to content

Commit

Permalink
parse the native_pack_linker field of ocamlc -config
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Pluvinage <[email protected]>
  • Loading branch information
TheLortex committed Dec 8, 2021
1 parent 6a0314c commit a18fd3a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Unreleased
----------

- Parse the `native_pack_linker` field of `ocamlc -config` (#??, @TheLortex)

- Fix plugins with dot in the name (#5182, @bobot, review @rgrinberg)

- Don't generate the dune-site build part when not needed (#4861, @bobot,
Expand Down
9 changes: 9 additions & 0 deletions src/ocaml-config/ocaml_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ type t =
; bytecomp_c_libraries : string list
; native_c_compiler : Prog_and_args.t
; native_c_libraries : string list
; native_pack_linker : Prog_and_args.t
; cc_profile : string list
; architecture : string
; model : string
Expand Down Expand Up @@ -156,6 +157,8 @@ let native_c_compiler t = t.native_c_compiler

let native_c_libraries t = t.native_c_libraries

let native_pack_linker t = t.native_pack_linker

let cc_profile t = t.cc_profile

let architecture t = t.architecture
Expand Down Expand Up @@ -244,6 +247,7 @@ let to_list
; bytecomp_c_libraries
; native_c_compiler
; native_c_libraries
; native_pack_linker
; cc_profile
; architecture
; model
Expand Down Expand Up @@ -295,6 +299,7 @@ let to_list
; ("bytecomp_c_libraries", Words bytecomp_c_libraries)
; ("native_c_compiler", Prog_and_args native_c_compiler)
; ("native_c_libraries", Words native_c_libraries)
; ("native_pack_linker", Prog_and_args native_pack_linker)
; ("cc_profile", Words cc_profile)
; ("architecture", String architecture)
; ("model", String model)
Expand Down Expand Up @@ -352,6 +357,7 @@ let by_name
; bytecomp_c_libraries
; native_c_compiler
; native_c_libraries
; native_pack_linker
; cc_profile
; architecture
; model
Expand Down Expand Up @@ -404,6 +410,7 @@ let by_name
| "bytecomp_c_libraries" -> Some (Words bytecomp_c_libraries)
| "native_c_compiler" -> Some (Prog_and_args native_c_compiler)
| "native_c_libraries" -> Some (Words native_c_libraries)
| "native_pack_linker" -> Some (Prog_and_args native_pack_linker)
| "cc_profile" -> Some (Words cc_profile)
| "architecture" -> Some (String architecture)
| "model" -> Some (String model)
Expand Down Expand Up @@ -575,6 +582,7 @@ let make vars =
get_prog_or_dummy_exn vars "bytecomp_c_compiler"
in
let native_c_compiler = get_prog_or_dummy_exn vars "native_c_compiler" in
let native_pack_linker = get_prog_or_dummy_exn vars "native_pack_linker" in
let ( c_compiler
, ocamlc_cflags
, ocamlc_cppflags
Expand Down Expand Up @@ -700,6 +708,7 @@ let make vars =
; bytecomp_c_libraries
; native_c_compiler
; native_c_libraries
; native_pack_linker
; cc_profile
; architecture
; model
Expand Down
2 changes: 2 additions & 0 deletions src/ocaml-config/ocaml_config.mli
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ val native_c_compiler : t -> Prog_and_args.t

val native_c_libraries : t -> string list

val native_pack_linker : t -> Prog_and_args.t

val cc_profile : t -> string list

val architecture : t -> string
Expand Down

0 comments on commit a18fd3a

Please sign in to comment.