ocaml/dune

Set mode-only flags

Offen

#1.481 geöffnet am 21.10.2018

 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)OCaml (478 Forks)github user discovery
enhancementhelp wanted

Repository-Metriken

Stars
 (1.882 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 20h) (345 gemergte PRs in 30 T)

Beschreibung

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!

Contributor Guide