File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,16 @@ def finalize_options(self):
9595 ]
9696 super ().finalize_options ()
9797
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+
99108 env = os .environ .copy ()
100109 if sys .platform == 'win32' :
101110 return env
@@ -162,7 +171,7 @@ def build_extensions(self):
162171 except (ValueError , AttributeError ):
163172 pass
164173
165- env = self .add_optional_flags ()
174+ env = self .add_optimization_flags ()
166175 for package in good_packages :
167176 package .do_custom_build (env )
168177 return super ().build_extensions ()
You can’t perform that action at this time.
0 commit comments