(self, env: 'Environment', libtype: LibType, strict: bool = False)
return tuple(patterns)
Get library prefixes and suffixes for the target platform ordered by
        priority
Get library prefixes and suffixes for the target platform ordered by
        priority
Get library prefixes and suffixes for the target platform ordered by priority
def get_library_naming(self, env: 'Environment', libtype: LibType, strict: bool = False) -> T.Tuple[str, ...]:
        '''
        Get library prefixes and suffixes for the target platform ordered by
        priority
        '''
        stlibext = ['a']
        # We've always allowed libname to be both `foo` and `libfoo`, and now
        # people depend on it. Also, some people use prebuilt `foo.so` instead
        # of `libfoo.so` for unknown reasons, and may also want to create
        # `foo.so` by setting name_prefix to ''
        if strict and not isinstance(self, VisualStudioLikeCompiler): # lib prefix is not usually used with msvc
            prefixes = ['lib']
        else:
            prefixes = ['lib', '']
        # Library suffixes and prefixes
        if env.machines[self.for_machine].is_darwin():
            shlibext = ['dylib', 'so']
        elif env.machines[self.for_machine].is_windows():
            # FIXME: .lib files can be import or static so we should read the
            # file, figure out which one it is, and reject the wrong kind.
            if isinstance(self, VisualStudioLikeCompiler):
                shlibext = ['lib']
            else:
                shlibext = ['dll.a', 'lib', 'dll']
            # Yep, static libraries can also be foo.lib
            stlibext += ['lib']
        elif env.machines[self.for_machine].is_cygwin():
            shlibext = ['dll', 'dll.a']
            prefixes = ['cyg'] + prefixes
        else:
            # Linux/BSDs
            shlibext = ['so']
        # Search priority
        if libtype is LibType.PREFER_SHARED:
            patterns = self._get_patterns(env, prefixes, shlibext, True)
            patterns.extend([x for x in self._get_patterns(env, prefixes, stlibext, False) if x not in patterns])
        elif libtype is LibType.PREFER_STATIC:
            patterns = self._get_patterns(env, prefixes, stlibext, False)
            patterns.extend([x for x in self._get_patterns(env, prefixes, shlibext, True) if x not in patterns])
        elif libtype is LibType.SHARED:
            patterns = self._get_patterns(env, prefixes, shlibext, True)
        else:
            assert libtype is LibType.STATIC
            patterns = self._get_patterns(env, prefixes, stlibext, False)
        return tuple(patterns)
def get_library_naming ( self , env : 'Environment' , libtype : LibType , strict : bool = False ) -> T . Tuple [ str , ... ] : stlibext = [ 'a' ] # We've always allowed libname to be both `foo` and `libfoo`, and now # people depend on it. Also, some people use prebuilt `foo.so` instead # of `libfoo.so` for unknown reasons, and may also want to create # `foo.so` by setting name_prefix to '' if strict and not isinstance ( self , VisualStudioLikeCompiler ) : # lib prefix is not usually used with msvc prefixes = [ 'lib' ] else : prefixes = [ 'lib' , '' ] # Library suffixes and prefixes if env . machines [ self . for_machine ] . is_darwin ( ) : shlibext = [ 'dylib' , 'so' ] elif env . machines [ self . for_machine ] . is_windows ( ) : # FIXME: .lib files can be import or static so we should read the # file, figure out which one it is, and reject the wrong kind. if isinstance ( self , VisualStudioLikeCompiler ) : shlibext = [ 'lib' ] else : shlibext = [ 'dll.a' , 'lib' , 'dll' ] # Yep, static libraries can also be foo.lib stlibext += [ 'lib' ] elif env . machines [ self . for_machine ] . is_cygwin ( ) : shlibext = [ 'dll' , 'dll.a' ] prefixes = [ 'cyg' ] + prefixes else : # Linux/BSDs shlibext = [ 'so' ] # Search priority if libtype is LibType . PREFER_SHARED : patterns = self . _get_patterns ( env , prefixes , shlibext , True ) patterns . extend ( [ x for x in self . _get_patterns ( env , prefixes , stlibext , False ) if x not in patterns ] ) elif libtype is LibType . PREFER_STATIC : patterns = self . _get_patterns ( env , prefixes , stlibext , False ) patterns . extend ( [ x for x in self . _get_patterns ( env , prefixes , shlibext , True ) if x not in patterns ] ) elif libtype is LibType . SHARED : patterns = self . _get_patterns ( env , prefixes , shlibext , True ) else : assert libtype is LibType . STATIC patterns = self . _get_patterns ( env , prefixes , stlibext , False ) return tuple ( patterns )