File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,16 @@ def finalize_options(self):
95
95
]
96
96
super ().finalize_options ()
97
97
98
- def add_optional_flags (self ):
98
+ def add_optimization_flags (self ):
99
+ """
100
+ Add optional optimization flags to extension.
101
+
102
+ This adds flags for LTO and hidden visibility to both compiled
103
+ extensions, and to the environment variables so that vendored libraries
104
+ will also use them. If the compiler does not support these flags, then
105
+ none are added.
106
+ """
107
+
99
108
env = os .environ .copy ()
100
109
if sys .platform == 'win32' :
101
110
return env
@@ -162,7 +171,7 @@ def build_extensions(self):
162
171
except (ValueError , AttributeError ):
163
172
pass
164
173
165
- env = self .add_optional_flags ()
174
+ env = self .add_optimization_flags ()
166
175
for package in good_packages :
167
176
package .do_custom_build (env )
168
177
return super ().build_extensions ()
You can’t perform that action at this time.
0 commit comments