Closed dbuenzli closed 10 years ago
In my mind, a Flags.t
is the final result of the thing you'll pass the to compilers. You build a Flags.t
by combining other flags together, by resolving external and internal names and so on. How do you want the conditionalizing to be done ?
If you think that could simplify your life, please do it :p
Well simply by adding a Features.t
argument to Flags.create
. E.g.:
let optim = Features.create "optim" ~doc:"enable optimizations" in
let optim_flags = Flags.create ~available:optim ~comp_native:[ "-inline"; "3"]
let unit = unit ~flags:optim_flags ...
Right I see. It indeed make sense!
Any particular reason why Flags can't be conditionalized on Features ? This could be very useful e.g. to inject flags
ocamlbuild
style.