Skip to main content

Module target

Module target 

Source
Expand description

This module defines the structures and logic for handling target-specific configuration within the bootstrap.toml file. This allows you to customize build settings, tools, and flags for individual compilation targets.

It includes:

  • TomlTarget: This struct directly mirrors the [target.<triple>] sections in your bootstrap.toml. It’s used for deserializing raw TOML data for a specific target.
  • Target: This struct represents the processed and validated configuration for a build target, which is is stored in the main Config structure.

Re-exportsΒ§

use std::collections::HashMap; πŸ”’
use std::path::PathBuf; πŸ”’
use serde::de::Error; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Deserializer; πŸ”’
use crate::core::backend::CodegenBackendKind; πŸ”’
use crate::core::config::macros::define_config; πŸ”’
use crate::core::config::Allocator; πŸ”’
use crate::core::config::CompilerBuiltins; πŸ”’
use crate::core::config::CompressDebuginfo; πŸ”’
use crate::core::config::LlvmLibunwind; πŸ”’
use crate::core::config::SplitDebuginfo; πŸ”’
use crate::core::config::StringOrBool; πŸ”’

StructsΒ§

Target
Per-target configuration stored in the global configuration structure.
TomlTarget
TOML representation of how each build target is configured.

EnumsΒ§

DefaultLinuxLinkerOverride
Overrides the default linker used on a Linux target. On Linux, the linker is usually invoked through cc, therefore this exists as a separate configuration from simply setting default-linker, which corresponds to -Clinker.

FunctionsΒ§

default_linux_linker_overrides
Set of linker overrides for selected Linux targets.