msys2

Software Distribution and Building Platform for Windows

Add to xmake.lua

add_requires("msys2")

Learn how to add and link packages with Xmake →

Information

Kind
toolchain
Recipe updated
2025-12-10T15:27:10.000Z

Platforms

  • windows: x64

Options

base_devel
Install base-devel. · Type: boolean · Default: false
diffutils
Install diffutils. · Type: boolean · Default: false
gcc
Install gcc. · Type: boolean · Default: false
make
Install gnumake. · Type: boolean · Default: false
mingw32_gcc
Install mingw32 gcc. · Type: boolean · Default: false
mingw32_toolchain
Install mingw32 toolchain. · Type: boolean · Default: false
mingw64_gcc
Install mingw64 gcc. · Type: boolean · Default: false
mingw64_toolchain
Install mingw64 toolchain. · Type: boolean · Default: false
msystem
Set msys2 system. · Type: string · Values: MSYS, MINGW32, MINGW64, UCRT64, CLANG32, CLANG64, CLANGARM64
pathtype
Set path type. · Type: string · Default: inherit · Values: inherit
uchardet
Install uchardet. · Type: boolean · Default: false

Versions

No versions listed.

Dependencies

Install with xrepo

Install the package independently of a project and inspect its available configuration.

install

xrepo install "msys2"

show info

xrepo info "msys2"

Bind a toolchain package

Template: replace TOOLCHAIN_NAME with the matching Xmake toolchain name, which may differ from the package name (for example, emcc for emscripten). Apply this selection to a compatible target and platform; this is not an add_packages library link.

xmake.lua — replace TOOLCHAIN_NAME

add_requires("msys2")

-- Replace TOOLCHAIN_NAME with the matching Xmake toolchain.
set_toolchains("TOOLCHAIN_NAME@msys2")

Open a package environment

Open a shell with the environment exported by this package. Use the executable names documented by the package.

enter shell

xrepo env -b "msys2" shell