diff --git a/Makefile b/Makefile index 79798fea4..a245fd777 100644 --- a/Makefile +++ b/Makefile @@ -108,9 +108,15 @@ ifeq (1, $(USE_SYS_DUNE_HACK)) ln -s $(SYS_DUNE_BASE_DIR)/lib/dune $(CURDIR)/_opam/sys_dune/lib/dune opam repo add upstream "git+https://github.com/ocaml/opam-repository.git" --on-switch=$(CONFIG_SWITCH_NAME) --rank 2 opam install --switch=$(CONFIG_SWITCH_NAME) --yes ocamlfind - opam install --switch=$(CONFIG_SWITCH_NAME) --yes "dune.$(SANDMARK_DUNE_VERSION)" "dune-configurator.$(SANDMARK_DUNE_VERSION)" - # Pin the version so it doesn't change when installing packages - opam pin add --switch=$(CONFIG_SWITCH_NAME) --yes -n dune "$(SANDMARK_DUNE_VERSION)" + @{ case "$*" in \ + 5.3.*) \ + echo "Pinning dune to fixed version to work around binary and native compiler options split"; \ + opam pin add --yes -n --switch $* dune."$(SANDMARK_DUNE_VERSION)" https://github.com/punchagan/dune.git#fix-compiler-opts; \ + opam install --switch=$(CONFIG_SWITCH_NAME) --yes "dune.$(SANDMARK_DUNE_VERSION)" "dune-configurator.$(SANDMARK_DUNE_VERSION)" ;; \ + *) \ + opam install --switch=$(CONFIG_SWITCH_NAME) --yes "dune.$(SANDMARK_DUNE_VERSION)" "dune-configurator.$(SANDMARK_DUNE_VERSION)" ; \ + opam pin add --switch=$(CONFIG_SWITCH_NAME) --yes -n dune "$(SANDMARK_DUNE_VERSION)" ;; \ + esac }; endif ocamls=$(wildcard ocaml-versions/*.json)