Skip to content
Open
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: 1 addition & 1 deletion src/dune_rules/lib_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ let foreign_rules (library : Foreign_library.t) ~sctx ~expander ~dir ~dir_conten
~has_cxx:(fun () -> Foreign.Sources.has_cxx_sources foreign_sources)
sctx
in
Expander.expand_and_eval_set expander Ordered_set_lang.Unexpanded.standard ~standard
Expander.expand_and_eval_set expander library.c_library_flags ~standard
in
ocamlmklib
~archive_name
Expand Down
9 changes: 8 additions & 1 deletion src/dune_rules/stanzas/foreign_library.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type t =
; stubs : Foreign.Stubs.t
; enabled_if : Blang.t
; extra_objects : Ordered_set_lang.Unexpanded.t
; c_library_flags : Ordered_set_lang.Unexpanded.t
}

let decode =
Expand All @@ -20,8 +21,14 @@ let decode =
Ordered_set_lang.Unexpanded.field
"extra_objects"
~check:(Dune_lang.Syntax.since Stanza.syntax (3, 19))
and+ c_library_flags = Ordered_set_lang.Unexpanded.field "c_library_flags"
Copy link
Collaborator

@Alizter Alizter Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since (3, 23) I suppose. See the ~check arg above.

in
{ archive_name; archive_name_loc; stubs; enabled_if; extra_objects })
{ archive_name
; archive_name_loc
; stubs
; enabled_if
; extra_objects
; c_library_flags })
;;

include Stanza.Make (struct
Expand Down
1 change: 1 addition & 0 deletions src/dune_rules/stanzas/foreign_library.mli
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type t =
; stubs : Foreign.Stubs.t
; enabled_if : Blang.t
; extra_objects : Ordered_set_lang.Unexpanded.t
; c_library_flags : Ordered_set_lang.Unexpanded.t
}

val decode : t Dune_lang.Decoder.t
Expand Down
Loading