File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,13 +102,23 @@ def add_optional_flags(self):
102102 cppflags = []
103103 if 'CPPFLAGS' in os .environ :
104104 cppflags .append (os .environ ['CPPFLAGS' ])
105+ cxxflags = []
106+ if 'CXXFLAGS' in os .environ :
107+ cxxflags .append (os .environ ['CXXFLAGS' ])
105108
106109 if has_flag (self .compiler , '-fvisibility=hidden' ):
107110 for ext in self .extensions :
108111 ext .extra_compile_args .append ('-fvisibility=hidden' )
109112 cppflags .append ('-fvisibility=hidden' )
113+ if has_flag (self .compiler , '-fvisibility-inlines-hidden' ):
114+ for ext in self .extensions :
115+ if self .compiler .detect_language (ext .sources ) != 'cpp' :
116+ continue
117+ ext .extra_compile_args .append ('-fvisibility-inlines-hidden' )
118+ cxxflags .append ('-fvisibility-inlines-hidden' )
110119
111120 env ['CPPFLAGS' ] = ' ' .join (cppflags )
121+ env ['CXXFLAGS' ] = ' ' .join (cxxflags )
112122
113123 return env
114124
You can’t perform that action at this time.
0 commit comments