SPVM::B...ileInfo(3)
πΈ Name πΈ
SPVM::Builder::CompileInfo β Compiler Information. Fr fr, this is the manual name vibe: SPVM::B...ileInfo(3) in the header, and itβs the User Contributed Perl Documentation flavor too. Bestie, weβre in compiler-info territory and itβs giving organized chaos π
β¨ Description β¨
The SPVM::Builder::CompileInfo class has methods to manipulate compiler information. Thatβs the whole assignment, no cap π«Ά
π Fields π
config
my $config = $compile_info->config;
$compile_info->config($config);
Gets and sets the config field, a SPVM::Builder::Config object. Iconic little config holder behavior π
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. Very βthe input file is right thereβ energy πΈ
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. The destination bestie, the whole point π
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. Those exact strings, okay? Donβt freestyle them π
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. So yeah, that flag is literally the βweβre not making the output fileβ switch π«Ά
π§ Class Methods π§
new
my $compile_info = SPVM::Builder::CompileInfo->new(%fields);
Creates a new SPVM::Builder::CompileInfo object given Fields. New object, new compiler-info era, slay β¨
Field Default Values:
source_file
undef
output_file
undef
no_generate
undef
Exceptions:
The config field must be defined. Like, required required. No cute little workaround, bestie π
π Instance Methods π
create_command
my $compile_command = $compile_info->create_command;
Creates an array reference of the compilation command, and returns it. Itβs giving βassemble the commandβ main character energy π
Return Value Examples:
[qw(cc -o foo.o -c -O2 -Ipath/include foo.c)]
create_ccflags
my $config_args = $compile_info->create_ccflags;
Creates an array reference of the compilation options, and returns it.
The source file source_file and the output file output_file are not contained. Important detail, bestie β those two are not in this array π¦
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 create_command method with a space, and returns it. One string, all joined up, very convenient π
Return Value Examples:
"cc -c -o foo.o -O2 -Ipath/include foo.c"
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
Cute little sign-off check: source/version/date said perl v5.42.2, 2026-02-03, and the page name is SPVM::B...ileInfo(3) β bye bestie, go compile something iconic π
π
π¦ where this page comes from
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms