Skip to content

Fix build break with GNU C++ compiler #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
long_description = file.read()


def remove_empty(li):
return [el for el in li if el]


def get_sdl_cflags():
cflags = []
if IS_LIN or IS_MAC:
Expand All @@ -71,7 +75,7 @@ def get_sdl_cflags():
"-Wformat-security",
]
# Add cflags from environment
cflags += os.getenv("CFLAGS", "").split(" ")
cflags += remove_empty(os.getenv("CFLAGS", "").split(" "))

return cflags

Expand All @@ -83,7 +87,7 @@ def get_sdl_ldflags():
elif IS_WIN:
ldflags = ["/NXCompat", "/DynamicBase"]
# Add ldflags from environment
ldflags += os.getenv("LDFLAGS", "").split(" ")
ldflags += remove_empty(os.getenv("LDFLAGS", "").split(" "))

return ldflags

Expand Down