SPVM::Builder::LinkInfo - Linker Information
The SPVM::Builder::LinkInfo class has methods to manipulate linker information.
my $link_info = SPVM::Builder::LinkInfo->new(%fields); my $link_command = $link_info->to_command;
my $config = $link_info->config; $link_info->config($config);
Gets and sets the config field, a SPVM::Builder::Config object.
config
my $output_file = $link_info->output_file; $link_info->output_file($output_file);
Gets and sets the output_file field, an output file.
output_file
my $object_files = $link_info->object_files; $link_info->object_files($object_files);
Gets and sets the object_files field, an array reference of SPVM::Builder::ObjectFileInfo objects.
object_files
my $link_info = SPVM::Builder::LinkInfo->new(%fields);
Creates a new SPVM::Builder::LinkInfo object given "Fields".
SPVM::Builder::LinkInfo
Field Default Values:
"output_file"
undef
"object_files"
[]
Exceptions:
The "config" field must be defined.
my $link_command = $link_info->create_command;
Creates an array reference of the link command, and returns it.
Return Value Examples:
[qw(cc -o dylib.so foo.o bar.o -shared -O2 -Llibdir -lz)]
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_files" are not contained.
[qw(-shared -O2 -Llibdir -lz)]
my $link_command_string = $link_info->to_command;
Joins all elements of the return value of the create_command method with a space, and returns it.
"cc -o dylib.so foo.o bar.o -shared -O2 -Llibdir -lz"
Copyright (c) 2023 Yuki Kimoto
MIT License
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.