File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,23 @@ def add_optional_flags(self):
102
102
cppflags = []
103
103
if 'CPPFLAGS' in os .environ :
104
104
cppflags .append (os .environ ['CPPFLAGS' ])
105
+ cxxflags = []
106
+ if 'CXXFLAGS' in os .environ :
107
+ cxxflags .append (os .environ ['CXXFLAGS' ])
105
108
106
109
if has_flag (self .compiler , '-fvisibility=hidden' ):
107
110
for ext in self .extensions :
108
111
ext .extra_compile_args .append ('-fvisibility=hidden' )
109
112
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' )
110
119
111
120
env ['CPPFLAGS' ] = ' ' .join (cppflags )
121
+ env ['CXXFLAGS' ] = ' ' .join (cxxflags )
112
122
113
123
return env
114
124
You can’t perform that action at this time.
0 commit comments