[build] do not create non-default new opam switches as aliases

Summary:
For instance, `./build-infer.sh --opam-switch "4.04.2+spacetime"` now builds an
actual spacetime switch instead of a clone of the 4.04.2 switch called
"4.04.2+spacetime".

Reviewed By: jberdine

Differential Revision: D5631258

fbshipit-source-id: e6295c5
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 54eaaa9573
commit 4c3a36ae4c

@ -141,7 +141,11 @@ opam_retry () {
setup_opam () {
opam_retry opam init --compiler=$OCAML_VERSION -j $NCPU --no-setup
opam_retry opam switch set -j $NCPU $INFER_OPAM_SWITCH --alias-of $OCAML_VERSION
if [ "$INFER_OPAM_SWITCH" = "$INFER_OPAM_SWITCH_DEFAULT" ]; then
opam_retry opam switch set -j $NCPU "$INFER_OPAM_SWITCH" --alias-of $OCAML_VERSION
else
opam_retry opam switch set -j $NCPU "$INFER_OPAM_SWITCH"
fi
}
# Install and record the infer dependencies in opam. The main trick is to install the

Loading…
Cancel
Save