Skip to content

Commit 839dd6a

Browse files
committed
reduce shared library file size
1 parent 46dac04 commit 839dd6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def get_extensions():
3535
define_macros += [('MTMETIS_64BIT_WEIGHTS', None)]
3636
define_macros += [('MTMETIS_64BIT_PARTITIONS', None)]
3737
libraries += ['mtmetis', 'wildriver']
38-
extra_compile_args = {'cxx': []}
39-
extra_link_args = []
38+
extra_compile_args = {'cxx': ['-O2']}
39+
extra_link_args = ['-s']
4040

4141
info = parallel_info()
4242
if 'parallel backend: OpenMP' in info and 'OpenMP not found' not in info:
@@ -53,7 +53,7 @@ def get_extensions():
5353
define_macros += [('WITH_CUDA', None)]
5454
nvcc_flags = os.getenv('NVCC_FLAGS', '')
5555
nvcc_flags = [] if nvcc_flags == '' else nvcc_flags.split(' ')
56-
nvcc_flags += ['-arch=sm_35', '--expt-relaxed-constexpr']
56+
nvcc_flags += ['-arch=sm_35', '--expt-relaxed-constexpr', '-O2']
5757
extra_compile_args['nvcc'] = nvcc_flags
5858

5959
if sys.platform == 'win32':

0 commit comments

Comments
 (0)