ocaml/dune

Set mode-only flags

オープン

#1,481 opened on 2018/10/21

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

Repository metrics

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

説明

Is it possible to pass custom flags for specific modes? For example, dune file below works for dune build main.exe but fails for dune build main.exe.o because ocamlopt does not expect -lfoo. Is there a way to set -lfoo only for exe mode and not for object mode?

Problematic example:

(executable
   (name main)
   (libraries base core ctypes ctypes.foreign ctypes.stubs)
   (link_flags (-cclib -lfoo))
   (modes object exe))

Thanks!

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