ct-commandline¶
This document describes the command line arguments that are common across ct-* programs¶
- Author:
- Date:
2017-07-06
- Copyright:
Copyright (C) 2011-2016 Zomojo Pty Ltd
- Version:
10.0.6
- Manual section:
1
- Manual group:
developers
SYNOPSIS¶
ct-* [args]
DESCRIPTION¶
All ct-* tools share a common set of command line arguments for configuration, verbosity control, and build variant selection. These arguments are processed uniformly across the toolkit.
OPTIONS¶
- --variant VARIANT
Specifies which build variant configuration to use. Variants compose from axis conf files: a toolchain (
gcc,clang), optionally a linker (ld,gold,mold,wild), an optimization level (debug,release), and any instrumentation axes (asan,ubsan,tsan,coverage,lto). Comma, dot, and whitespace are interchangeable separators:--variant=gcc,mold,release,asanis equivalent to--variant=gcc.mold.release.asan. Usect-list-variantsto discover available axis confs on your system.- -c CONFIG_FILE, --config CONFIG_FILE
Specifies an additional configuration file to load. Configuration values are merged with system and user configs according to precedence rules: command line > environment variables > config files > defaults.
- –include PATH [PATH …]
Extra path(s) to add to the include search path. Accepts one or more space-separated paths, e.g.
--include path/to/headers another/path.- –CPPFLAGS FLAGS [FLAGS …]
C preprocessor flags (override). By default unified with CXXFLAGS.
- –CXXFLAGS FLAGS [FLAGS …]
C++ compiler flags (override). By default unified with CPPFLAGS.
- --separate-flags-CPP-CXX
Keep CPPFLAGS and CXXFLAGS as separate values instead of merging them. By default they are unified into a single deduplicated set.
- -v, --verbose
Increase output verbosity. Can be specified multiple times for more detail (e.g.,
-vvor-v -v).- -q, --quiet
Decrease output verbosity. Useful for silencing tools that default to verbose output.
- --version
Display the version number and exit.
- -?, -h, –help
Display help message and exit.
- --man, --doc
Display the full documentation/manual page for the tool. Requires the
rich_rstPython module to be installed.
CONFIGURATION¶
Configuration is handled through a hierarchy of sources:
Command line arguments (highest priority)
Environment variables (e.g.,
CT_VARIANT,CT_VERBOSE)User config files (
~/.config/ct/ct.confon Linux)System config files (
/etc/xdg/ct/ct.confon Linux)Built-in defaults (lowest priority)
The configuration system uses python-configargparse and follows XDG directory conventions on Linux.
SEE ALSO¶
compiletools (1), ct-config (1), ct-list-variants (1)