Open alan-j-hu opened 1 year ago
What you have written there is not a boolean comparison which is why enabled_if
is rejecting it. I agree that the error message is poor. What you need to do is something like this:
(enabled_if
(= %{env:DUNE_COQ_TEST=disable} enable)))
The equality inside %{env:}
is just a default value.
No, the following also doesn't work:
(library
(name llvm_shared)
(public_name llvm.shared)
(implements llvm)
(enabled_if (= %{env:LLVM_SHARED_AVAILABLE=false} true))
(foreign_stubs
(language c)
(names llvm_ocaml))
(c_library_flags (:include c_library_flags.sexp)))
The following code I want to write is not supported:
The error message I get is
The documentation just lists variables that are supported in general and variables that are not supported in general but supported in action stanzas.
env:<var>=<default>
is listed as a variable supported in general. So, there's either a bug in Dune or the Dune documentation is wrong.Also, the error message mentions the
ccomp_type
variable, which isn't even in the documentation.What I'm ultimately trying to do might be an XY problem, but in any case, in this specific situation, the documentation and behavior don't match.