Skip to content

Commit

Permalink
Add os-distribution=msys2 if using MSYS2 during install
Browse files Browse the repository at this point in the history
* Part of ocaml/opam#5348
  • Loading branch information
jonahbeckford committed Nov 18, 2022
1 parent 2f767a9 commit ff42f08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/unix/private/init-opam-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ fi
# https://github.com/msys2/MSYS2-packages/blob/1ff9c79a6b6b71492c4824f9888a15314b85f5fa/filesystem/msystem:
# MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX
#
# Opam Global Variables (part 1):
# Opam Global Variables (part 1 ... these will end up as compiler flags or a conf package):
# msystem=CLANG64
# msystem-prefix=/clang64
# msystem-carch=x86_64
Expand All @@ -390,7 +390,9 @@ fi
#
# Opam Global Variables (part 2):
# msys2-nativedir=C:\msys64
# os-distribution=msys2
if [ -n "${DKMLMSYS2DIR_BUILDHOST:-}" ] && [ -n "${MSYSTEM:-}" ]; then
run_opam var --global "os-distribution=msys2"
run_opam var --global "msystem=$MSYSTEM"
run_opam var --global "msystem-prefix=${MSYSTEM_PREFIX:-}"
run_opam var --global "msystem-carch=${MSYSTEM_CARCH:-}"
Expand Down

0 comments on commit ff42f08

Please sign in to comment.