Config

sealed trait Config

An object describing how to configure the Scala Native toolchain.

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

This is the name of the executable or library. Calculated based on a prefix for libraries lib for UNIX like OSes, baseName, -test if testConfig is true, and the executable or library suffix depending on platform and library type.

This is the name of the executable or library. Calculated based on a prefix for libraries lib for UNIX like OSes, baseName, -test if testConfig is true, and the executable or library suffix depending on platform and library type.

Final Path to the output file, executable or library. Calculated based on baseDir / artifactName.

Final Path to the output file, executable or library. Calculated based on baseDir / artifactName.

Base Directory for native work products.

Base Directory for native work products.

Base name for executable or library, typically the project/module name from the build tool moduleName or can be overridden by the user with NativeConfig#baseName. This must be unique over all module names and other baseNames in the project. Delegated method to NativeConfig#baseName

Base name for executable or library, typically the project/module name from the build tool moduleName or can be overridden by the user with NativeConfig#baseName. This must be unique over all module names and other baseNames in the project. Delegated method to NativeConfig#baseName

Build path to support multiple main applications.

Build path to support multiple main applications.

For libraries it is the same as the artifactPath and for applications it resolves to workDir / artifactName and after the build it is copied to artifactPath.

Sequence of all NIR locations.

Sequence of all NIR locations.

The NativeConfig that is used by the developer to control settings.

The NativeConfig that is used by the developer to control settings.

The logger used by the toolchain.

The logger used by the toolchain.

Entry point for linking.

Entry point for linking.

Name of the project module from the build system. Must be unique amongst modules in the larger project.

Name of the project module from the build system. Must be unique amongst modules in the larger project.

Returns:

moduleName

Sequence of all Scala sources locations used when mapping binary symbols with original sources.

Sequence of all Scala sources locations used when mapping binary symbols with original sources.

Indicates whether this is a test config or not.

Indicates whether this is a test config or not.

def withBaseDir(value: Path): Config

Create a new config with given base directory.

Create a new config with given base directory.

Create a new config with given nir paths.

Create a new config with given nir paths.

Create a Config with a new NativeConfig.

Create a Config with a new NativeConfig.

Create a Config with a function which takes and returns a NativeConfig.

Create a Config with a function which takes and returns a NativeConfig.

def withLogger(value: Logger): Config

Create a new config with the given logger.

Create a new config with the given logger.

Create new config with a fully qualified (with package) main class name as an Option. Only applicable if NativeConfig#buildTarget is a BuildTarget#application.

Create new config with a fully qualified (with package) main class name as an Option. Only applicable if NativeConfig#buildTarget is a BuildTarget#application.

Value parameters:
value

fully qualified main class name as an Option, default None

Returns:

this config object

Create a new config with the module name - required.

Create a new config with the module name - required.

Create a new config with given Scala sources paths.

Create a new config with given Scala sources paths.

Create a new config with test (true) or normal config (false).

Create a new config with test (true) or normal config (false).

Directory to emit intermediate compilation results. Calculated based on baseDir / native or native-test if a test project. The build creates directories if they do not exist.

Directory to emit intermediate compilation results. Calculated based on baseDir / native or native-test if a test project. The build creates directories if they do not exist.

Concrete methods

def LTO: LTO

The LTO mode to use used during a release build.

The LTO mode to use used during a release build.

Shall linker check that NIR is well-formed after every phase?

Shall linker check that NIR is well-formed after every phase?

def clang: Path

The path to the clang executable.

The path to the clang executable.

The path to the clang++ executable.

The path to the clang++ executable.

The compilation options passed to LLVM.

The compilation options passed to LLVM.

Shall linker dump intermediate NIR after every phase?

Shall linker dump intermediate NIR after every phase?

def gc: GC

The garbage collector to use.

The garbage collector to use.

Should stubs be linked?

Should stubs be linked?

The options passed to LLVM's linker.

The options passed to LLVM's linker.

def mode: Mode

Compilation mode.

Compilation mode.