Skip to content

Commit d422e30

Browse files
committed
parse the native_pack_linker field of ocamlc -config
Signed-off-by: Lucas Pluvinage <lucas@tarides.com>
1 parent 4db21fe commit d422e30

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Unreleased
22
----------
33

4+
- Parse the `native_pack_linker` field of `ocamlc -config` (#5281, @TheLortex)
5+
46
- Fix plugins with dot in the name (#5182, @bobot, review @rgrinberg)
57

68
- Don't generate the dune-site build part when not needed (#4861, @bobot,

src/ocaml-config/ocaml_config.ml

+9
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ type t =
8888
; bytecomp_c_libraries : string list
8989
; native_c_compiler : Prog_and_args.t
9090
; native_c_libraries : string list
91+
; native_pack_linker : Prog_and_args.t
9192
; cc_profile : string list
9293
; architecture : string
9394
; model : string
@@ -156,6 +157,8 @@ let native_c_compiler t = t.native_c_compiler
156157

157158
let native_c_libraries t = t.native_c_libraries
158159

160+
let native_pack_linker t = t.native_pack_linker
161+
159162
let cc_profile t = t.cc_profile
160163

161164
let architecture t = t.architecture
@@ -244,6 +247,7 @@ let to_list
244247
; bytecomp_c_libraries
245248
; native_c_compiler
246249
; native_c_libraries
250+
; native_pack_linker
247251
; cc_profile
248252
; architecture
249253
; model
@@ -295,6 +299,7 @@ let to_list
295299
; ("bytecomp_c_libraries", Words bytecomp_c_libraries)
296300
; ("native_c_compiler", Prog_and_args native_c_compiler)
297301
; ("native_c_libraries", Words native_c_libraries)
302+
; ("native_pack_linker", Prog_and_args native_pack_linker)
298303
; ("cc_profile", Words cc_profile)
299304
; ("architecture", String architecture)
300305
; ("model", String model)
@@ -352,6 +357,7 @@ let by_name
352357
; bytecomp_c_libraries
353358
; native_c_compiler
354359
; native_c_libraries
360+
; native_pack_linker
355361
; cc_profile
356362
; architecture
357363
; model
@@ -404,6 +410,7 @@ let by_name
404410
| "bytecomp_c_libraries" -> Some (Words bytecomp_c_libraries)
405411
| "native_c_compiler" -> Some (Prog_and_args native_c_compiler)
406412
| "native_c_libraries" -> Some (Words native_c_libraries)
413+
| "native_pack_linker" -> Some (Prog_and_args native_pack_linker)
407414
| "cc_profile" -> Some (Words cc_profile)
408415
| "architecture" -> Some (String architecture)
409416
| "model" -> Some (String model)
@@ -575,6 +582,7 @@ let make vars =
575582
get_prog_or_dummy_exn vars "bytecomp_c_compiler"
576583
in
577584
let native_c_compiler = get_prog_or_dummy_exn vars "native_c_compiler" in
585+
let native_pack_linker = get_prog_or_dummy_exn vars "native_pack_linker" in
578586
let ( c_compiler
579587
, ocamlc_cflags
580588
, ocamlc_cppflags
@@ -700,6 +708,7 @@ let make vars =
700708
; bytecomp_c_libraries
701709
; native_c_compiler
702710
; native_c_libraries
711+
; native_pack_linker
703712
; cc_profile
704713
; architecture
705714
; model

src/ocaml-config/ocaml_config.mli

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ val native_c_compiler : t -> Prog_and_args.t
9898

9999
val native_c_libraries : t -> string list
100100

101+
val native_pack_linker : t -> Prog_and_args.t
102+
101103
val cc_profile : t -> string list
102104

103105
val architecture : t -> string

0 commit comments

Comments
 (0)