++ed by:
HAMMER YOUPONG BRDUCH AZJADFTRE FAYLAND
10 non-PAUSE users
Author image Yuki Kimoto

Name

SPVM::Builder::LinkInfo - Link Information

Description

SPVM::Builder::LinkInfo is a link information. This infromation is used by the linker.

Fields

output_file

  my $output_file = $link_info->output_file;
  $link_info->output_file($output_file);

Get and set the object file that is compiled.

output_type

  my $output_type = $link_info->output_type;
  $link_info->output_type($output_type);

Get and set the output type.

ld

  my $ld = $link_info->ld;
  $link_info->ld($ld);

Get and set the linker name.

ld_optimize

  my $ld_optimize = $link_info->ld_optimize;
  $link_info->ld_optimize($ld_optimize);

Get and set the linker optimization option.

ldflags

  my $ldflags = $link_info->ldflags;
  $link_info->ldflags($ldflags);

Get and set the linker flags. The default value is [].

dynamic_lib_ldflags

  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 [].

lib_dirs

  my $lib_dirs = $link_info->lib_dirs;
  $link_info->$link_info->lib_dirs($lib_dirs);

Get and set the library directories. The default is [].

object_file_infos

  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.

lib_infos

  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.

class_name

  my $class_name = $link_info->class_name;
  $link_info->class_name($class_name);

Get and set the class name.

config

  my $config = $link_info->config;
  $link_info->config($config);

Get and set the config that is used to link the objects.

Class Methods

new

  my $link_info = SPVM::Builder::LinkInfo->new;

Instance Methods

new

  my $link_info = SPVM::Builder::LinkInfo->new;

Create a new SPVM::Builder::LinkInfo object.

create_merged_ldflags

  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.

Examples:

  [qw(cc -o dylib.so foo.o bar.o -shared -O2 -Llibdir -lz)]

to_string

  my $string = $link_info->to_string;

Get the string representation of the link command.

Examples:

  cc -o dylib.so foo.o bar.o -shared -O2 -Llibdir -lz