Skip to content
Yuki Kimoto edited this page Mar 1, 2024 · 1 revision

A native config file for CUDA/nvcc:

my $config = SPVM::Builder::Config->new(file => __FILE__);

# Compiler and Linker common
my @ccldflags = qw(--compiler-options '-fPIC');

# Compiler
$config->cc('nvcc');
$config->add_ccflag(@ccldflags);
$config->ext('cu');

# Linker
$config->ld('nvcc');
$config->add_ldflag('-shared', @ccldflags);

$config;
Clone this wiki locally