5c33a36100
- Introduced a new method `apply_default_string` to streamline the application of default values for string fields in build flags. - Enhanced `apply_flags_table` to utilize the new method for setting various build flags, improving code readability and maintainability. - Added support for additional build flags: `fuse_ld`, `ranlib`, `strip`, `nm`, `objcopy`, `objdump`, and `readelf`. - Implemented a new command `set` to manage tool aliases for compilers, linkers, and shells, allowing users to set preferred tools in the build environment. - Improved error handling and validation for tool alias configuration, ensuring that existing non-symlink files are not replaced. - Added tests to verify the correct behavior of tool alias management and build flag application.
91 lines
2.9 KiB
TOML
91 lines
2.9 KiB
TOML
# Example /etc/depot.toml
|
|
#
|
|
# This file is the main system-wide configuration for Depot.
|
|
# Keep settings here for machine-wide defaults that should apply to every user.
|
|
# For smaller drop-in overrides, prefer adding files under /etc/depot.d/.
|
|
#
|
|
# Most values here act as defaults and can still be overridden:
|
|
# - per package in package specs
|
|
# - per invocation with CLI flags
|
|
# - per user in ~/.config/depot.toml
|
|
|
|
[build]
|
|
# Installation prefix used by supported build systems when a package does not
|
|
# override it explicitly. For a normal system package build this is usually /usr.
|
|
prefix = "/usr"
|
|
|
|
# Default toolchain commands. These are passed through to builders that honor
|
|
# CC/CXX/AR and related variables.
|
|
# tool_dir = "/usr/bin"
|
|
cc = "clang"
|
|
ar = "ar"
|
|
|
|
# Optional examples:
|
|
# cxx = "$TOOL_DIR/clang++"
|
|
# ld = "$TOOL_DIR/ld.lld"
|
|
# cpp = "$TOOL_DIR/cpp"
|
|
# strip = "$TOOL_DIR/strip"
|
|
# ranlib = "$TOOL_DIR/ranlib"
|
|
# nm = "$TOOL_DIR/nm"
|
|
# objcopy = "$TOOL_DIR/objcopy"
|
|
# objdump = "$TOOL_DIR/objdump"
|
|
# readelf = "$TOOL_DIR/readelf"
|
|
|
|
[build.flags]
|
|
# Baseline C compiler flags for packages that do not supply their own.
|
|
# Keep these conservative unless you are intentionally tuning for one machine.
|
|
cflags = ["-O2"]
|
|
|
|
# Appends are often clearer than rewriting the whole list. This demonstrates
|
|
# Depot's += support for layered config files.
|
|
# NOTE: this is NOT regular TOML syntax. The += operator is a special extension that Depot supports
|
|
cflags += ["-g"]
|
|
|
|
# Optional C++ and linker defaults:
|
|
# cxxflags = ["-O2"]
|
|
ldflags = ["-Wl,-O1"]
|
|
# Select a linker through compiler drivers such as clang/gcc.
|
|
# fuse_ld = "lld"
|
|
|
|
# Link-time optimization defaults. When use_lto is true, Depot will inject
|
|
# ltoflags into the appropriate compiler and linker flag sets automatically.
|
|
# ltoflags = ["-flto=auto"]
|
|
# use_lto = false
|
|
|
|
# Target architecture short name (CARCH). If unset, Depot derives this from the
|
|
# current host system or active cross target.
|
|
carch = "x86_64"
|
|
|
|
# Target triples are usually only needed for cross or multilib scenarios.
|
|
# chost = "x86_64-pc-linux-gnu"
|
|
# cbuild = "x86_64-pc-linux-gnu"
|
|
|
|
# Optional install directory overrides for supported builders. Leave these at
|
|
# their defaults unless you are intentionally targeting a non-standard layout.
|
|
# bindir = "/usr/bin"
|
|
# sbindir = "/usr/bin"
|
|
# libdir = "/usr/lib"
|
|
# libexecdir = "/usr/lib"
|
|
# sysconfdir = "/etc"
|
|
# localstatedir = "/var"
|
|
# sharedstatedir = "/var/lib"
|
|
# includedir = "/usr/include"
|
|
# datarootdir = "/usr/share"
|
|
# datadir = "/usr/share"
|
|
# mandir = "/usr/share/man"
|
|
# infodir = "/usr/share/info"
|
|
|
|
# Additional examples:
|
|
# makeflags = "-j8"
|
|
# env_vars = ["CCACHE_DIR=/var/cache/ccache"]
|
|
# passthrough_env = ["http_proxy", "https_proxy"]
|
|
|
|
[install]
|
|
# When true, Depot will also try to install declared test dependencies while
|
|
# resolving dependencies for source builds.
|
|
test_deps = false
|
|
|
|
# Example future-friendly place for install policy overrides:
|
|
# assume_yes = false
|
|
# keep_cache = true
|