ct-commandline

This document describes the command line arguments that are common across ct-* programs

Author:

drgeoffathome@gmail.com

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,asan is equivalent to --variant=gcc.mold.release.asan. Use ct-list-variants to 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., -vv or -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_rst Python module to be installed.

CONFIGURATION

Configuration is handled through a hierarchy of sources:

  1. Command line arguments (highest priority)

  2. Environment variables (e.g., CT_VARIANT, CT_VERBOSE)

  3. User config files (~/.config/ct/ct.conf on Linux)

  4. System config files (/etc/xdg/ct/ct.conf on Linux)

  5. 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)