SPVM::Builder::LinkInfo - Link Information
SPVM::Builder::LinkInfo is a link information. This infromation is used by the linker.
SPVM::Builder::LinkInfo
my $output_file = $link_info->output_file; $link_info->output_file($output_file);
Get and set the object file that is compiled.
my $output_type = $link_info->output_type; $link_info->output_type($output_type);
Get and set the output type.
my $ld = $link_info->ld; $link_info->ld($ld);
Get and set the linker name.
my $ld_optimize = $link_info->ld_optimize; $link_info->ld_optimize($ld_optimize);
Get and set the linker optimization option.
my $ldflags = $link_info->ldflags; $link_info->ldflags($ldflags);
Get and set the linker flags. The default value is [].
[]
my $dynamic_lib_ldflags = $link_info->dynamic_lib_ldflags; $link_info->dynamic_lib_ldflags($dynamic_lib_ldflags);
Get and set the linker flags for dynamic library. The default value is [].
my $lib_dirs = $link_info->lib_dirs; $link_info->$link_info->lib_dirs($lib_dirs);
Get and set the library directories. The default is [].
my $object_file_infos = $link_info->object_file_infos; $link_info->object_file_infos($object_file_infos);
Get and set the object file informations to be linked. Each object file is a SPVM::Builder::ObjectFileInfo object.
my $lib_infos = $link_info->lib_infos; $link_info->lib_infos($lib_infos);
Get and set the library informations to be linked. Each object file is a SPVM::Builder::LibInfo object.
my $class_name = $link_info->class_name; $link_info->class_name($class_name);
Get and set the class name.
my $config = $link_info->config; $link_info->config($config);
Get and set the config that is used to link the objects.
my $link_info = SPVM::Builder::LinkInfo->new;
Create a new SPVM::Builder::LinkInfo object.
my $merged_ldflags = $link_info->create_merged_ldflags;
Create the merged ldflags as an array reference.
Examples:
[qw(-shared -O2 -Llibdir -lz)]
my $link_command = $link_info->create_link_command;
Create the link command as an array reference.
[qw(cc -o dylib.so foo.o bar.o -shared -O2 -Llibdir -lz)]
my $string = $link_info->to_string;
Get the string representation of the link command.
cc -o dylib.so foo.o bar.o -shared -O2 -Llibdir -lz
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.