=head1 Name

SPVM::Document::EnvironmentVariables - SPVM Environment Variables

=head1 Description

This document explains SPVM environment variables.

=head1 Environment Variables

=head2 SPVM_BUILD_DIR

A directory for files generated by the compiler and linker.

C source codes for precompilation, dynamic link libraries and object files are stored into this directory.

These files are output when attempting to build a module containing methods with the C<native> attribute or the C<precompile> attribute.

If the C<SPVM_BUILD_DIR> environment variable is a non-empty string, these files are output to the directory. If the directory does not exist, an exception is thrown.

If the C<SPVM_BUILD_DIR> environment variable is not spacified, a temporary directory is created at the beginning of the program, and the path is set to the environment variable.

Examples:

  # bash
  export SPVM_BUILD_DIR=~/.spvm_build
  
  # csh
  setenv SPVM_BUILD_DIR ~/.spvm_build

=head2 SPVM_FORCE_BUILD

If it is a true value, compilations and links are forced.

=head2 SPVM_FORCE_QUIET

If it is a non-empty string and a true value, no diagnostic messages from compilers and linkers are printed.

If it is a non-empty string and a false value of Perl, diagnostic messages from compilers and linkers are printed.

This setting has a higher priority than L<SPVM::Builder::Config#quiet|SPVM::Builder::Config/"quiet"> field.

=head2 SPVM_FORCE_OPTIMIZE

If it is a non-empty string, the value is used as a compiler flag for optimaization.

This setting has a higher priority than L<SPVM::Builder::Config#optimize|SPVM::Builder::Config/"optimize"> field.

=head1 See Also

=over 2

=item * L<SPVM::Document>

=back

=head1 Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License
