@@ -34,10 +34,11 @@ elif build_config_compiler == "linux_gcc":
34
34
std_opt = ["-std=%s" % pybind11_build_config ["cxx_std" ]]
35
35
vis_opt = ["-fvisibility=hidden" ]
36
36
opt_opt = ["-O0" , "-g" ]
37
- wrn_opt = ["-Wall" , "-Wextra" , "-Wconversion" , "-Wcast-qual" , "-Wdeprecated" , "-Wnon-virtual-dtor" , "-Wunused-result" ]
37
+ wrn_opt = ["-Wall" , "-Wextra" , "-Wconversion" , "-Wcast-qual" , "-Wdeprecated" , "-Wnon-virtual-dtor" , "-Wunused-result" , "-Werror" ]
38
38
39
39
extra_defines = arguments_get_split ("extra_defines" )
40
40
extra_defines .append ("PYBIND11_STRICT_ASSERTS_CLASS_HOLDER_VS_TYPE_CASTER_MIX" )
41
+ extra_defines .append ("PYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD_IF_AVAILABLE" )
41
42
42
43
def process_meta_opts ():
43
44
meta_opts = arguments_get_split ("meta_opts" )
@@ -122,12 +123,18 @@ for main_module in [
122
123
"class_sh_module_local_0" ,
123
124
"class_sh_module_local_1" ,
124
125
"class_sh_module_local_2" ,
126
+ "namespace_visibility_2" ,
125
127
]:
126
128
if Glob ("#pybind11/tests/%s.cpp" % main_module ):
127
129
pybind11_tests_shared_library (
128
130
target = "#lib/%s" % main_module ,
129
131
sources = ["%s.cpp" % main_module ])
130
132
133
+ if Glob ("#pybind11/tests/namespace_visibility_1.cpp" ):
134
+ pybind11_tests_shared_library (
135
+ target = "#lib/namespace_visibility_1" ,
136
+ sources = ["namespace_visibility_1.cpp" , "namespace_visibility_1s.cpp" ])
137
+
131
138
env_base .Clone (
132
139
CPPDEFINES = extra_defines ,
133
140
CPPPATH = ["#pybind11/include" ,
@@ -144,7 +151,7 @@ env_base.Clone(
144
151
python_include ,
145
152
"#Catch2/single_include/catch2" ],
146
153
CXXFLAGS = std_opt + opt_opt + wrn_opt ,
147
- LINKFLAGS = ["-rdynamic" ] + opt_opt ,
154
+ LINKFLAGS = ["-Llib" , "- rdynamic" ] + opt_opt ,
148
155
LIBS = [python_lib , "pthread" , "dl" , "util" ]).Program (
149
156
target = "#bin/test_embed" ,
150
157
source = build_paths_in_subdir (
0 commit comments