Name
SPVM::Builder::LinkInfo - Link Information
Description
SPVM::Builder::LinkInfo class manages information for a link.
Usage
my $link_info = SPVM::Builder::LinkInfo->new(%fields);
Super Class
Fields
object_file_infos
my $object_file_infos = $link_info->object_file_infos;
$link_info->object_file_infos($object_file_infos);
Gets and sets the object_file_infos field, an array reference of SPVM::Builder::ObjectFileInfo objects.
dl_func_list
my $dl_func_list = $link_info->dl_func_list;
$link_info->dl_func_list($dl_func_list);
Gets and sets the dl_func_list field. It is an array reference of function names to be exported from a dynamic library for Windows.
Class Methods
new
my $link_info = SPVM::Builder::LinkInfo->new(%fields);
Creates a new SPVM::Builder::LinkInfo object given "Fields", and returns it.
Field Default Values:
Exceptions:
"config" field must be defined.
Instance Methods
create_command
my $link_command = $link_info->create_command;
my $link_command_no_output = $link_info->create_command({no_output_option => 1});
Creates an array reference of the link command, and returns it.
If the no_output_option option is a true value, the output option (e.g. -o dylib.so) is not added to the command.
Return Value Examples:
[qw(cc -o dylib.so foo.o bar.o -shared -O2 -Llibdir -lz)]
# With no_output_option => 1
[qw(cc foo.o bar.o -shared -O2 -Llibdir -lz)]
create_ldflags
my $ldflags = $link_info->create_ldflags;
Creates an array reference of the linker options, and returns it.
The output file "output_file" and the object files "object_file_infos" are not contained.
Return Value Examples:
[qw(-shared -O2 -Llibdir -lz)]
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License