Skip to content

Commit

Permalink
work around dune bug with enabled_if
Browse files Browse the repository at this point in the history
  • Loading branch information
mroch committed Feb 25, 2023
1 parent 24b037f commit fcc14e3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dune
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
(rule
(enabled_if
(= %{ocaml-config:ccomp_type} cc))
(action
(with-stdout-to
c_flags.sexp
(echo
"(-std=c99 -g -Wall -Wshadow -Werror -Wextra -Wshadow -Wno-unused-parameter)"))))
"(-std=c99 -g -Wall -Wshadow -Werror -Wextra -Wshadow -Wno-unused-parameter)")))
(enabled_if
(= %{ocaml-config:ccomp_type} cc)))

(rule
(enabled_if
(<> %{ocaml-config:ccomp_type} cc))
(action
(with-stdout-to
c_flags.sexp
(echo "()"))))
(echo "()")))
(enabled_if
(<> %{ocaml-config:ccomp_type} cc)))

(library
(name dtoa)
Expand Down

1 comment on commit fcc14e3

@mroch
Copy link
Contributor Author

@mroch mroch commented on fcc14e3 Feb 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dune < 2.8 errors if rule contains enabled_if first, but not if there's something else first. it was fixed in ocaml/dune#3831

Please sign in to comment.