Skip to content
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

Add env var to control stripping debug info #507

Merged
merged 2 commits into from Feb 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion setup.py
@@ -1,12 +1,19 @@
import platform
from glob import glob
from os import environ

from setuptools import Extension, setup

dconv_source_files = glob("./deps/double-conversion/double-conversion/*.cc")
dconv_source_files.append("./lib/dconv_wrapper.cc")

strip_flags = ["-Wl,--strip-all"] if platform.system() == "Linux" else []
if platform.system() == "Linux" and environ.get("UJSON_BUILD_NO_STRIP", "0") not in (
"1",
"True",
):
strip_flags = ["-Wl,--strip-all"]
else:
strip_flags = []

module1 = Extension(
"ujson",
Expand Down