File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ def run(self):
8686 ext = self .ext_map ['xmlsec' ]
8787 self .debug = os .environ .get ('PYXMLSEC_ENABLE_DEBUG' , False )
8888 self .static = os .environ .get ('PYXMLSEC_STATIC_DEPS' , False )
89+ self .size_opt = os .environ .get ('PYXMLSEC_OPTIMIZE_SIZE' , True )
8990
9091 if self .static or sys .platform == 'win32' :
9192 self .info ('starting static build on {}' .format (sys .platform ))
@@ -153,11 +154,18 @@ def run(self):
153154 )
154155
155156 if self .debug :
156- ext .extra_compile_args .append ('-Wall' )
157- ext .extra_compile_args .append ('-O0' )
158157 ext .define_macros .append (('PYXMLSEC_ENABLE_DEBUG' , '1' ))
158+ if sys .platform == 'win32' :
159+ ext .extra_compile_args .append ('/Od' )
160+ else :
161+ ext .extra_compile_args .append ('-Wall' )
162+ ext .extra_compile_args .append ('-O0' )
159163 else :
160- ext .extra_compile_args .append ('-Os' )
164+ if self .size_opt :
165+ if sys .platform == 'win32' :
166+ ext .extra_compile_args .append ('/Os' )
167+ else :
168+ ext .extra_compile_args .append ('-Os' )
161169
162170 super (build_ext , self ).run ()
163171
You can’t perform that action at this time.
0 commit comments