File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -446,6 +446,24 @@ def test_installed_soname(self):
446446 libdir = self .installdir + os .path .join (self .prefix , self .libdir )
447447 self ._test_soname_impl (libdir , True )
448448
449+ @skip_if_not_base_option ('b_sanitize' )
450+ def test_c_link_args_and_env (self ):
451+ '''
452+ Test that the CFLAGS / CXXFLAGS environment variables are
453+ included on the linker command line when c_link_args is
454+ set but c_args is not.
455+ '''
456+ if is_cygwin ():
457+ raise SkipTest ('asan not available on Cygwin' )
458+ if is_openbsd ():
459+ raise SkipTest ('-fsanitize=address is not supported on OpenBSD' )
460+
461+ testdir = os .path .join (self .common_test_dir , '1 trivial' )
462+ env = {'CFLAGS' : '-fsanitize=address' }
463+ self .init (testdir , extra_args = ['-Dc_link_args="-L/usr/lib"' ],
464+ override_envvars = env )
465+ self .build ()
466+
449467 def test_compiler_check_flags_order (self ):
450468 '''
451469 Test that compiler check flags override all other flags. This can't be
You can’t perform that action at this time.
0 commit comments