Skip to content

Commit bc244c5

Browse files
committed
Strip debug symbols from Linux wheels
Add -g0 to extra_compile_args to override manylinux Python's default -g flag and prevent debug symbols from being included in wheels. Setting CFLAGS as environment variable didn't seem to have an effect in those cases.
1 parent 2dc113b commit bc244c5

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ skip = ["pp38-*"]
1616
enable = ["pypy"]
1717
test-requires = "pytest"
1818
test-command = "pytest {project}/tests"
19-
environment = { CFLAGS = "-g0" }
2019

2120
[tool.cibuildwheel.macos]
2221
archs = ["x86_64", "universal2", "arm64"]

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def _configure_extensions_with_vendored_libs() -> List[Extension]:
9292
libraries = []
9393
if platform.system() != "Windows":
9494
extra_compile_args.append("-std=c++11")
95+
extra_compile_args.append("-g0")
9596
define_macros.append(("HAVE_MMAP", "1"))
9697
define_macros.append(("HAVE_UNISTD_H", "1"))
9798
define_macros.append(("HAVE_SYS_MMAN_H", "1"))

0 commit comments

Comments
 (0)