Manpage logo

SPVM::Builder::CompileInfo - Compiler Information

Name  Description  Fields  config  source_file  output_file  category  no_generate  Class Methods  new  Instance Methods  create_command  create_ccflags  to_command  Copyright & License 

Name

SPVM::Builder::CompileInfo − Compiler Information

Description

The SPVM::Builder::CompileInfo class has methods to manipulate compiler information.

Fields

config

my $config = $compile_info−>config;
$compile_info−>config($config);

Gets and sets the "config" field, a SPVM::Builder::Config object.

source_file

my $source_file = $compile_info−>source_file;
$compile_info−>source_file($source_file);

Gets and sets the "source_file" field, a source file.

output_file

my $output_file = $compile_info−>output_file;
$compile_info−>output_file($output_file);

Gets and sets the "output_file" field, an output file.

category

my $category = $config−>category;
$config−>category($category);

Gets and sets the "category" field.

These are "native_class", "native_source", "precompile_class", "spvm", "spvm_core".

no_generate

my $no_generate = $link_info−>no_generate;
$link_info−>no_generate($no_generate);

Gets and sets the "no_generate" field. If this field is a true value, the output file is not generated.

Class Methods

new

my $compile_info = SPVM::Builder::CompileInfo−>new(%fields);

Creates a new SPVM::Builder::CompileInfo object given "Fields".

Field Default Values:

"source_file"

undef

"output_file"

undef

"no_generate"

undef

Exceptions:

The "config" field must be defined.

Instance Methods

create_command

my $compile_command = $compile_info−>create_command;

Creates an array reference of the compilation command, and returns it.

Return Value Examples:

[qw(cc −o foo.o −c −O2 −Ipath/include foo.c)]

create_ccflags

my $config_args = $compile_info−>create_ccflags;

Creates n array reference of the compilation options, and returns it.

The source file "source_file" and the output file "output_file" are not contained.

Return Value Examples:

[qw(−O2 −Ipath/include)]

to_command

my $compile_command_string = $compile_info−>to_command;

Joins all elements of the return value of the the "create_command" method with a space, and returns it.

Return Value Examples:

"cc −c −o foo.o −O2 −Ipath/include foo.c"

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License


Updated 2026-06-01 - jenkler.se | uex.se