Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse the native_pack_linker field of ocamlc -config #5281

Merged
merged 1 commit into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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` (#5281, @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