Skip to content

Commit

Permalink
compat: Only build for Linux if we have a compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed May 6, 2024
1 parent 051c1fd commit d1bdbd6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion compat/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ def setup(role: Role,
have_compiler = True
else:
have_compiler = False
elif host_os == "linux" and host_config is None:
triplet = "i686-linux-gnu" if host_arch == "x86_64" else "x86_64-linux-gnu"
if shutil.which(triplet + "-gcc") is not None:
other_triplet = triplet
have_compiler = True
else:
have_compiler = False
else:
have_compiler = True

Expand Down Expand Up @@ -174,7 +181,7 @@ def setup(role: Role,
target=SERVER_TARGET),
]

if host_os == "linux" and host_arch in {"x86_64", "x86"}:
if host_os == "linux" 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 d1bdbd6

Please sign in to comment.