(self)
Warn if shared modules are linked with target: (link_with) #2865
Warn if shared modules are linked with target: (link_with) #2865
Warn if shared modules are linked with target : ( link_with ) #2865
def check_module_linking(self):
        '''
        Warn if shared modules are linked with target: (link_with) #2865
        '''
        for link_target in self.link_targets:
            if isinstance(link_target, SharedModule) and not link_target.backwards_compat_want_soname:
                if self.environment.machines[self.for_machine].is_darwin():
                    raise MesonException(
                        f'target {self.name} links against shared module {link_target.name}. This is not permitted on OSX')
                else:
                    mlog.deprecation(f'target {self.name} links against shared module {link_target.name}, which is incorrect.'
                            '\n             '
                            f'This will be an error in the future, so please use shared_library() for {link_target.name} instead.'
                            '\n             '
                            f'If shared_module() was used for {link_target.name} because it has references to undefined symbols,'
                            '\n             '
                            'use shared_libary() with `override_options: [\'b_lundef=false\']` instead.')
                    link_target.backwards_compat_want_soname = True
def check_module_linking ( self ) : for link_target in self . link_targets : if isinstance ( link_target , SharedModule ) and not link_target . backwards_compat_want_soname : if self . environment . machines [ self . for_machine ] . is_darwin ( ) : raise MesonException ( f'target {self.name} links against shared module {link_target.name}. This is not permitted on OSX' ) else : mlog . deprecation ( f'target {self.name} links against shared module {link_target.name}, which is incorrect.' '\n             ' f'This will be an error in the future, so please use shared_library() for {link_target.name} instead.' '\n             ' f'If shared_module() was used for {link_target.name} because it has references to undefined symbols,' '\n             ' 'use shared_libary() with `override_options: [\'b_lundef=false\']` instead.' ) link_target . backwards_compat_want_soname = True