Skip to content

Commit

Permalink
compat: Add support for MinGW-w64
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed May 3, 2024
1 parent 497994e commit 65dcc69
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion compat/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,17 @@ def setup(role: Role,

if "native" in compat:
other_triplet: Optional[str] = None
if host_os == "windows" and host_config == "mingw":
triplet = "i686-w64-mingw32" if host_arch == "x86_64" else "x86_64-w64-mingw32"
if shutil.which(triplet + "-gcc") is not None:
other_triplet = triplet
have_compiler = True
else:
have_compiler = False
else:
have_compiler = True

if host_os == "windows" and host_arch in {"x86_64", "x86"}:
if host_os == "windows" and host_arch in {"x86_64", "x86"} and have_compiler:
if host_arch == "x86_64":
other_arch = "x86"
kind = "legacy"
Expand Down

0 comments on commit 65dcc69

Please sign in to comment.