@FeatureNew('both_libraries', '0.46.0')
def build_both_libraries(self, node, args, kwargs):
    shared_lib = self.build_target(node, args, kwargs, build.SharedLibrary)
    pic = True
    key = OptionKey('b_staticpic')
    if ('pic' in kwargs):
        pic = kwargs['pic']
    elif (key in self.environment.coredata.options):
        pic = self.environment.coredata.options[key].value
    if (self.backend.name == 'xcode'):
        reuse_object_files = False
    else:
        reuse_object_files = pic
    if reuse_object_files:
        static_args = [args[0]]
        static_kwargs = kwargs.copy()
        static_kwargs['sources'] = []
        static_kwargs['objects'] = shared_lib.extract_all_objects()
    else:
        static_args = args
        static_kwargs = kwargs
    static_lib = self.build_target(node, static_args, static_kwargs, build.StaticLibrary)
    return build.BothLibraries(shared_lib, static_lib)
@FeatureNew('both_libraries', '0.46.0')
def build_both_libraries(self, node, args, kwargs):
    shared_lib = self.build_target(node, args, kwargs, build.SharedLibrary)
    pic = True
    key = OptionKey('b_staticpic')
    if ('pic' in kwargs):
        pic = kwargs['pic']
    elif (key in self.environment.coredata.options):
        pic = self.environment.coredata.options[key].value
    if (self.backend.name == 'xcode'):
        reuse_object_files = False
    else:
        reuse_object_files = pic
    if reuse_object_files:
        static_args = [args[0]]
        static_kwargs = kwargs.copy()
        static_kwargs['sources'] = []
        static_kwargs['objects'] = shared_lib.extract_all_objects()
    else:
        static_args = args
        static_kwargs = kwargs
    static_lib = self.build_target(node, static_args, static_kwargs, build.StaticLibrary)
    return build.BothLibraries(shared_lib, static_lib)