Skip to content

Commit

Permalink
symbols, no-optimizations for segfault debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
gojomo committed Jan 8, 2020
1 parent ac339e8 commit 0e45691
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ def make_c_ext(use_cython=False):
for module, source in c_extensions.items():
if use_cython:
source = source.replace('.c', '.pyx')
yield Extension(module, sources=[source], language='c')
extra_args = []
extra_args.extend(['-g', '-O0'])
yield Extension(
module,
sources=[source],
language='c',
extra_compile_args=extra_args,
)


def make_cpp_ext(use_cython=False):
Expand All @@ -63,7 +70,7 @@ def make_cpp_ext(use_cython=False):
extra_args.append('-std=c++11')
elif system == 'Darwin':
extra_args.extend(['-stdlib=libc++', '-std=c++11'])

extra_args.extend(['-g', '-O0'])
for module, source in cpp_extensions.items():
if use_cython:
source = source.replace('.cpp', '.pyx')
Expand Down

0 comments on commit 0e45691

Please sign in to comment.