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):
86
86
ext = self .ext_map ['xmlsec' ]
87
87
self .debug = os .environ .get ('PYXMLSEC_ENABLE_DEBUG' , False )
88
88
self .static = os .environ .get ('PYXMLSEC_STATIC_DEPS' , False )
89
+ self .size_opt = os .environ .get ('PYXMLSEC_OPTIMIZE_SIZE' , True )
89
90
90
91
if self .static or sys .platform == 'win32' :
91
92
self .info ('starting static build on {}' .format (sys .platform ))
@@ -153,11 +154,18 @@ def run(self):
153
154
)
154
155
155
156
if self .debug :
156
- ext .extra_compile_args .append ('-Wall' )
157
- ext .extra_compile_args .append ('-O0' )
158
157
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' )
159
163
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' )
161
169
162
170
super (build_ext , self ).run ()
163
171
You can’t perform that action at this time.
0 commit comments