NAME
SPVM::Builder::Config - build config
DESCRIPTION
SPVM::Builder::Config is configuration of c/c++ compile and link.
Methods
new
my $bconf = SPVM::Builder::Config->new;
Create SPVM::Builder::Config object.
replace_all_config
my $config = {cc => 'g++', ld => 'g++'};
$bconf->replace_all_config($config);
Replace all config.
All of old configs is removed and added new config.
to_hash
my $config = $bconf->to_hash;
Convert configs to hash reference.
get_config
my $cc = $bconf->get_config('cc');
Get a config value.
set_config
$bconf->set_config(cc => $cc);
Set a config value.
set_std
$bconf->set_std('gnu99');
Set std
.
Internally, remove -std=old
if exists and add -std=new
after extra_compiler_flags
.
delete_std
$bconf->delete_std;
Delete std
.
Internally, remove -std=old
if exists from extra_compiler_flags
.
set_cc
$bconf->set_cc($cc);
Set cc
.
get_cc
my $cc = $bconf->get_cc;
Get cc
.
set_optimize
$bconf->set_optimize($optimize);
Set optimize
.
get_optimize
my $optimize = $bconf->get_optimize;
Get optimize
.
set_ld
$bconf->set_ld($ld);
Set ld
.
get_ld
my $ld = $bconf->get_ld;
Get ld
.
set_lddlflags
$bconf->set_lddlflags($lddlflags);
Set lddlflags
.
get_lddlflags
my $lddlflags = $bconf->get_lddlflags;
Get lddlflags
.
add_lddlflags
$bconf->add_lddlflags($lddlflags);
Add lddlflags
after current lddlflags
.
new_c99
my $bconf = SPVM::Builder::Config->new_c99;
Create defaulgt build config. This is SPVM::Builder::Config object.
get_extra_compiler_flags
my $extra_compiler_flags = $bconf->get_extra_compiler_flags;
Get extra_compiler_flags
.
set_extra_compiler_flags
$bconf->set_extra_compiler_flags($extra_compiler_flags);
Set extra_compiler_flags
.
add_extra_compiler_flags
$bconf->add_extra_compiler_flags($extra_compiler_flags);
Add new extra_compiler_flags
after current extra_compiler_flags
.
get_extra_linker_flags
my $extra_linker_flags = $bconf->get_extra_linker_flags;
Get extra_linker_flags
.
set_extra_linker_flags
$bconf->set_extra_linker_flags($extra_linker_flags);
Set extra_linker_flags
.
add_extra_linker_flags
$bconf->add_extra_linker_flags($extra_linker_flags);
Add new extra_linker_flags
after current extra_linker_flags
.
get_include_dirs
my $include_dirs = $bconf->get_include_dirs;
Get include directories. This value is array refernce.
set_include_dirs
$bconf->set_include_dirs($include_dirs);
add_include_dir
$bconf->add_include_dir($include_dir);
get_force_compile
my $force_compile = $bconf->get_force_compile;
Get force_compile
field.
force_compile
field is used by compile
method of SPVM::Builder::CC to determine whether the method should force compilation of source codes without cache.
set_force_compile
$bconf->set_force_compile($force_compile);
Set force_compile
field.
See get_force_compile
method about force_compile
field.