Skip to content

Commit

Permalink
Merge pull request #160 from karcherm/allow-triplet-gcc
Browse files Browse the repository at this point in the history
Use gcc-specific _compile method for triplet-gcc as well
  • Loading branch information
fgregg authored Sep 30, 2024
2 parents c6d25ad + 49caf20 commit c0a5f95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def c_compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
cc_args = cc_args + ["-std=c99"] if src.endswith(".c") else cc_args
return _compile(obj, src, ext, cc_args, extra_postargs, pp_opts)

if c.compiler_type == "unix" and "gcc" in c.compiler:
if c.compiler_type == "unix" and \
any(item == "gcc" or item.endswith("-gcc") for item in c.compiler):
c._compile = c_compile

elif self.compiler.compiler_type == "msvc":
Expand Down

0 comments on commit c0a5f95

Please sign in to comment.