Toolchain

Info

Used to create an toolchain; can only be placed into the top-level block (file).

Usage:

toolchain "name" {
    # toolchain commands
}
Arguments
# Name Type Info
0 name str Expanded?: ❌

Subcommands

These commands are only valid directly inside the toolchain, not in blocks supplied to these commands.

on_arch

Adds an architecture that this toolchains accepts. Argument must be a valid nitto architecture string. Requires an additional block that get’s applied once the toolchain is resolved for usage.

toolchain "gcc" {
    on_arch "x86_64" {
        # toolchain body commands
    }
}
Arguments
# Name Type Info
0 architecture str Expanded?: ❌

on_mode

Adds an block to be applied when the toolchain is resolved for usage and only when the specified mode is set. Available modes are: debug and release.

toolchain "gcc" {
    on_mode debug {
        # toolchain body commands
    }
}
Arguments
# Name Type Info
0 mode sym

on_opt

Adds an block to be applied when the toolchain is resolved for usage and only when the specified option is set.

toolchain "gcc" {
    on_opt "build.lto" {
        # toolchain body commands
    }
}
Arguments
# Name Type Info
0 mode sym

on_check

Adds an block thats specifies checks which need to succeed in order for the toolchain to be considered valid.

toolchain "gcc" {
    on_check {
        # ...
    }
}

plat

Specfies the platform this toolchain builds for.

Aliases: platform

toolchain "gcc" {
    plat "linux"
}
Arguments
# Name Type Info
0 platform str Expanded?: ❌

lang

Adds an language that this toolchains accepts. Argument must be a language name that a plugin registers. Requires an optional block that get’s applied once the toolchain is resolved for usage.

Aliases: platform

toolchain "gcc" {
    lang "c"
    lang "cpp" {
        # toolchain body commands
    }
}
Arguments
# Name Type Info
0 language str Expanded?: ❌

Body commands

These commands are valid in the toolchain directly as well as in most of the direct subcommands above

set

Sets / modifies data of the toolchain; often these are names of binaries, locations or flags.

Simple

When using this variant, keys set with this are only containing strings.

Example: set "cc" "gcc"

Arguments
# Name Type Info
0 key str

The key to set

Expanded?: ✅
1 value str

The value to set the key to

Expanded?: ✅

Complex

When using this variant, you can manipulate the data already stored. Mostly used in bodies of on_ variants to add flags

Example: set "cflags" append " -g"

Operation Description
append Appends to the end of the string
prepend Prepends to the start of the string
Arguments
# Name Type Info
0 key str

The key to modify

Expanded?: ✅
1 operation sym

The operation to do; see table above

2 val str

The value to use as input for the operation

Expanded?: ✅