Name

SPVM Makefile.PL

Description

Makefile.PL for SPVM build.

These options are also available in the Makefile.PL generated by spvmdist.

Usage

# Basic build
perl Makefile.PL

# Debug build with specific compiler flags
perl Makefile.PL --debug

# Debug build with specific compiler flags and ASan on Linux
perl Makefile.PL --debug --asan-on-linux
 
# Parallel build and test
perl Makefile.PL --parallel-make --parallel-test

# Generate metadata only
perl Makefile.PL --meta

Command Line Options

--cc

Specifies the C compiler command.

--ccflag

Specifies additional compiler flags.

--define

Adds -D macros to the compiler.

--ld

Specifies the linker command.

--ldflag

Specifies additional linker flags.

--debug

Sets the build type "--build-type" to Debug.

--build-type

Specifies the build type. The possible values are Debug, Release, RelWithDebInfo, or MinSizeRel.

--asan-on-linux

Enables AddressSanitizer (ASan) for memory error detection on Linux.

ASan generates a separate log file for each process. To efficiently find both corruption reports and leaks related to your specific module, use the following Perl one-liner (Replace My::Module with your module's name):

perl -00 -ne 'print "--- File: $ARGV ---\n$_\n" if /My::Module/' .spvm_build/asan_logs/* > .spvm_build/asan_summary.log

--msvc

Compile source codes by using MSVC config(SPVM::Builder::Config::Global::MSVC).

--no-build-spvm-modules

Disables the build of SPVM native and precompile modules.

--meta

Runs in metadata generation mode.

--parallel-make

Enables parallel builds using multiple CPU cores.

--parallel-test

Enables parallel execution of tests.

--jobs

Specifies the number of parallel jobs for the build and testing. Defaults to CPU count + 2 (max 16).