NativeConfig

sealed trait NativeConfig

An object describing how to configure the Scala Native toolchain.

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

Base name for executable or library, typically the project name.

Base name for executable or library, typically the project name.

Build target for current compilation

Build target for current compilation

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

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

Shall linker NIR check treat warnings as errors?

Shall linker NIR check treat warnings as errors?

Should build fail if it detects usage of unsupported feature on given platform

Should build fail if it detects usage of unsupported feature on given platform

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?

Shall the resource files be embedded in the resulting binary file? Allows the use of getClass().getResourceAsStream() on the included files. Will not embed files with certain extensions, including ".c", ".h", ".scala" and ".class".

Shall the resource files be embedded in the resulting binary file? Allows the use of getClass().getResourceAsStream() on the included files. Will not embed files with certain extensions, including ".c", ".h", ".scala" and ".class".

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.

Map of user defined properties resolved at linktime

Map of user defined properties resolved at linktime

def lto: LTO

The LTO mode to use used during a release build.

The LTO mode to use used during a release build.

def mode: Mode

Compilation mode.

Compilation mode.

Shall be compiled with multithreading support. If equal to None the toolchain would detect if program uses system threads - when not thrads are not used, the program would be linked without multihreading support.

Shall be compiled with multithreading support. If equal to None the toolchain would detect if program uses system threads - when not thrads are not used, the program would be linked without multihreading support.

Shall we optimize the resulting NIR code?

Shall we optimize the resulting NIR code?

Configuration when doing optimization

Configuration when doing optimization

A glob pattern that matches list of files to exclude from embedding into the executable.

A glob pattern that matches list of files to exclude from embedding into the executable.

A glob pattern that matches list of files to embed into the executable.

A glob pattern that matches list of files to embed into the executable.

Should sanitizer implemention be used?

Should sanitizer implemention be used?

Configuration for semantics of generated program

Configuration for semantics of generated program

List of service providers which shall be allowed in the final binary

List of service providers which shall be allowed in the final binary

Configuration for LLVM metadata generation controlling source level debugging support

Configuration for LLVM metadata generation controlling source level debugging support

Optional target triple that defines current OS, ABI and CPU architecture.

Optional target triple that defines current OS, ABI and CPU architecture.

Shall we use the incremental compilation?

Shall we use the incremental compilation?

Create a new config with given base artifact name.

Create a new config with given base artifact name.

Warning: must be unique across project modules.

Create a new config with given build target

Create a new config with given build target

Create a new config with given check value.

Create a new config with given check value.

Create a new config with given checkFatalWarnings value.

Create a new config with given checkFatalWarnings value.

Create a new config with given checkFeatures value.

Create a new config with given checkFeatures value.

Create a new config with given path to clang.

Create a new config with given path to clang.

Create a new config with given path to clang++.

Create a new config with given path to clang++.

Create a new config with updated compilation options.

Create a new config with updated compilation options.

Create a new config with given dump value.

Create a new config with given dump value.

Create a new NativeConfig enabling embedded resources in the executable with a value of true where false is default.

Create a new NativeConfig enabling embedded resources in the executable with a value of true where false is default.

def withGC(value: GC): NativeConfig

Create a new config with given garbage collector.

Create a new config with given garbage collector.

Create a new config with given incrementalCompilation value

Create a new config with given incrementalCompilation value

def withLTO(value: LTO): NativeConfig

Create a new config with the given lto mode.

Create a new config with the given lto mode.

Create a new config with given behavior for stubs.

Create a new config with given behavior for stubs.

Create a new config with updated linking options.

Create a new config with updated linking options.

Create a new config with updated linktime properites

Create a new config with updated linktime properites

Create a new config with given compilation mode.

Create a new config with given compilation mode.

Create a new config with support for multithreading

Create a new config with support for multithreading

Create a new config with support for multithreading

Create a new config with support for multithreading

Create a new config with given optimize value

Create a new config with given optimize value

Modify a optimization configuration

Modify a optimization configuration

Create a new NativeConfig with updated resource exclude patterns.

Create a new NativeConfig with updated resource exclude patterns.

Create a new NativeConfig with updated resource include patterns.

Create a new NativeConfig with updated resource include patterns.

Create a new config with given sanitizer enabled.

Create a new config with given sanitizer enabled.

Modify a semantics configuration

Modify a semantics configuration

Create a new NativeConfig with a updated list of service providers allowed in the final binary

Create a new NativeConfig with a updated list of service providers allowed in the final binary

Create a new config given a target triple.

Create a new config given a target triple.

Create a new config given a target triple. Delegates to withTargetTriple(Option[String]).

Create a new config given a target triple. Delegates to withTargetTriple(Option[String]).

Value parameters:
value

target triple as a String

Returns:

a new NativeConfig with a new target triple

Concrete methods

Are we targeting a 32-bit platform?

Are we targeting a 32-bit platform?

Returns:

true if 32 bit, false if 64 bit, unknown, or 16 bit

Create a new config with given compilation options.

Create a new config with given compilation options.

Create a new config with given linking options.

Create a new config with given linking options.

Create a new config with given linktime properites

Create a new config with given linktime properites

Create a optimization configuration

Create a optimization configuration

Create a new config with given sanitizer enabled.

Create a new config with given sanitizer enabled.

Create a semantics configuration

Create a semantics configuration