Using gecc PreviousNext

Command-line options

The usual way to invoke gecc is as follows:

gecc <script_filename>
This will read the C compilation command-lines generated by gec in the script file <script_filename> (typically of the form <system_name>.bat or <system_name>.sh). It will execute them (except the last one) concurrently using a number of threads corresponding to the number of CPUs available on the machine), and then will execute the last line (which is supposed to be the link command to generate the executable file).

Here is the list of options that can be used with gecc:

-h
--help
Print a summary of the command-line options of gecc and exit.
--thread=<thread_count>
Number of threads to be used to run gecc. Negative numbers -N mean "number of CPUs - N". (default: -3, aka "max (number of CPUs -3, 1)")
-V
--version
Print the version number of gecc and exit.

Environment variables

It is possible to override some of the command-line options above, or the default values for these options, using environment variables.

$GOBO_CLI_THREAD
Override the command-line option --thread.
$GOBO_DEFAULT_THREAD
Override the default value when the command-line option --thread has not been specified and the environment variable $GOBO_CLI_THREAD has not been set.


Copyright (c) 2018-2025, Eric Bezault
mailto:ericb@gobosoft.com
https://www.gobosoft.com
Last Updated: 6 December 2025
HomeTocPreviousNext