Skip to content

Commit

Permalink
🏁 Check for linux-musl in CC & CXX environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
arjxn-py committed Jun 9, 2024
1 parent f82aa83 commit 33bb909
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ def run(self):

# Build a static binary on Windows to avoid missing DLLs from MinGW,
# i.e., libgcc_s_seh-1.dll, libstdc++-6.dll, etc.
BUILD_STATIC = os.environ.get("GOOS") == "windows" or sys.platform == "win32"
BUILD_STATIC = "linux-musl" in os.environ.get(
"CC", ""
) or "linux-musl" in os.environ.get("CXX", "")

if BUILD_STATIC:
ldflags.append("-extldflags '-static'")
Expand Down

0 comments on commit 33bb909

Please sign in to comment.