ocaml/dune

add `forbidden_linkall` as an optional field in executable(s) stanza

オープン

#12,748 opened on 2025/11/19

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)OCaml (478 件のフォーク)github user discovery
help wanted

Repository metrics

Stars
 (1,882 個のスター)
PR merge metrics
 (平均マージ 1d 20h) (30d で 345 merged PRs)

説明

In the same style as forbidden_libraries, it'd be useful to have forbidden_linkall to guarantee an executable is not compiled with linkall.

It turns out dune can add the linkall option if some libraries (notably dune-site, but I don't know if there are others) are in the dependency graph (even transitively). Because of this, the linkall flag can creep up into an executable when a new dependency is added or when a dependency is updated (e.g., camomile<2 and camomile≥2).

Expected behaviour

With a stanza

(executable
 (forbidden_linkall)
 …)

is evaluated. The build fails if the executable would be compiled with linkall.

コントリビューターガイド