module battery.detect.gdc

Detect and find the gdc command.

Code Map

//! Detect and find the gdc command.
module battery.detect.gdc;


//! Used as a argument when supplying a command on the command line.
struct FromArgs
{
public:
	cmd: string;
	args: string[];
}

//! The result of the dection, also holds any extra arguments to get NASM
//! to output in the correct format.
struct Result
{
public:
	ver: semver.Release;
	from: string;
	cmd: string;
	args: string[];
}

//! Detect and find the nasm command.
fn detectFromPath(path: string, results: Result[]) bool { }
//! Detect gdc from arguments.
fn detectFromArgs(arg: FromArgs, result: Result) bool { }
//! Check the battery config for gdc.
fn detectFromBatConf(batConf: BatteryConfig, result: Result) bool { }
//! Add extra arguments to the command, any given args are appended after
//! the extra arguments.
fn addArgs(from: Result, arch: Arch, platform: Platform, res: Result) { }
struct FromArgs

Used as a argument when supplying a command on the command line.

struct Result

The result of the dection, also holds any extra arguments to get NASM to output in the correct format.

fn detectFromPath(path: string, results: Result[]) bool

Detect and find the nasm command.

fn detectFromArgs(arg: FromArgs, result: Result) bool

Detect gdc from arguments.

fn detectFromBatConf(batConf: BatteryConfig, result: Result) bool

Check the battery config for gdc.

fn addArgs(from: Result, arch: Arch, platform: Platform, res: Result)

Add extra arguments to the command, any given args are appended after the extra arguments.

global log: battery.util.log.Logger

So we get the right prefix on logged messages.

fn getTargetString(arch: Arch) string

Returns the format to be outputed for this configuration.