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_ccflags
$bconf->set_ccflags($ccflags);
Set ccflags
.
get_ccflags
my $ccflags = $bconf->get_ccflags;
Get ccflags
.
add_ccflags
$bconf->add_ccflags($ccflags);
Add ccflags
after current ccflags
.
set_std
$bconf->set_std('c99');
Set std
.
Internally, remove -std=old
and add -std=new
after ccflags
.
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_default
my $bconf = SPVM::Builder::Config->new_default;
Create defaulgt build config. This is SPVM::Builder::Config object.