File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,31 @@ def get_sources():
2222 return sorted (glob .glob ("src/*.c" ) + ["vendor/hiredis/%s.c" % src for src in hiredis_sources ])
2323
2424
25+ def get_linker_args ():
26+ if 'win32' in sys .platform or 'darwin' in sys .platform :
27+ return []
28+ else :
29+ return ["-Wl,-Bsymbolic" , ]
30+
31+
2532def get_compiler_args ():
2633 if 'win32' in sys .platform :
2734 return []
2835 else :
29- return ["-std=c99" , "-static-libstdc++" , "-O2" ]
36+ return ["-std=c99" ]
3037
3138
3239def get_libraries ():
3340 if 'win32' in sys .platform :
34- return ["ws2_32" ,]
41+ return ["ws2_32" , ]
3542 else :
3643 return []
3744
3845
3946ext = Extension ("hiredis.hiredis" ,
4047 sources = get_sources (),
4148 extra_compile_args = get_compiler_args (),
49+ extra_link_args = get_linker_args (),
4250 libraries = get_libraries (),
4351 include_dirs = ["vendor" ])
4452
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ pack_command(PyObject *cmd)
3737 {
3838 return PyErr_NoMemory ();
3939 }
40-
40+
4141 memset (tokens , 0 , sizeof (sds ) * tokens_number );
4242
4343 size_t * lengths = hi_malloc (sizeof (size_t ) * tokens_number );
You can’t perform that action at this time.
0 commit comments