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

Strip debugging symbols from Linux binaries #493

Merged
merged 2 commits into from Dec 17, 2021
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
5 changes: 4 additions & 1 deletion setup.py
@@ -1,10 +1,13 @@
import platform
from glob import glob

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 []

module1 = Extension(
"ujson",
sources=dconv_source_files
Expand All @@ -17,7 +20,7 @@
],
include_dirs=["./python", "./lib", "./deps/double-conversion/double-conversion"],
extra_compile_args=["-D_GNU_SOURCE"],
extra_link_args=["-lstdc++", "-lm"],
extra_link_args=["-lstdc++", "-lm"] + strip_flags,
)

with open("python/version_template.h") as f:
Expand Down