def link_whole(self, target):
    for t in listify(target, unholder=True):
        if (not isinstance(t, StaticLibrary)):
            raise InvalidArguments('{!r} is not a static library.'.format(t))
        if (isinstance(self, SharedLibrary) and (not t.pic)):
            msg = "Can't link non-PIC static library {!r} into shared library {!r}. ".format(t.name, self.name)
            msg += "Use the 'pic' option to static_library to build with PIC."
            raise InvalidArguments(msg)
        if (self.is_cross != t.is_cross):
            raise InvalidArguments('Tried to mix cross built and native libraries in target {!r}'.format(self.name))
        self.link_whole_targets.append(t)
def link_whole(self, target):
    for t in listify(target, unholder=True):
        if (not isinstance(t, StaticLibrary)):
            raise InvalidArguments('{!r} is not a static library.'.format(t))
        if (isinstance(self, SharedLibrary) and (not t.pic)):
            msg = "Can't link non-PIC static library {!r} into shared library {!r}. ".format(t.name, self.name)
            msg += "Use the 'pic' option to static_library to build with PIC."
            raise InvalidArguments(msg)
        if (self.is_cross != t.is_cross):
            raise InvalidArguments('Tried to mix cross built and native libraries in target {!r}'.format(self.name))
        self.link_whole_targets.append(t)