# Module qbs

The `qbs` module is implicitly loaded in every product. It contains properties of the current build environment, independent of the used programming languages and toolchains.

## buildVariant

Type: | `string`
Default: | `"debug"`

Contains the name of the build variant for the current build.

## debugInformation

Type: | `bool`
Default: | `true` for debug builds, `false` otherwise

Specifies whether to generate debug information.

## enableDebugCode

Type: | `bool`
Default: | `true` for debug builds, `false` otherwise

Specifies whether to compile debug code in the product. This is typically enabled for debug builds and disabled for release builds.

## optimization

Type: | `string`
Allowed Values: | `"none"`, `"fast"`, `"small"`
Default: | `"none"` for debug builds, `"fast"` for release builds

Specifies the general type of optimization that should be performed by all toolchains.

## hostOS

Type: | `stringList` (read only)

This property is set by qbs internally and specifies the OS qbs is running on. The possible values for this property are the values of `targetOS`, though some may not be supported.

## targetOS

Type: | `stringList`
Possible Values: | one or more of: `"aix"`, `"android"`, `"blackberry"`, `"bsd"`, `"bsd4"`, `"bsdi"`, `"cygwin"`, `"darwin"`, `"dgux"`, `"dynix"`, `"freebsd"`, `"hpux"`, `"hurd"`, `"integrity"`, `"ios"`, `"ios-simulator"`, `"irix"`, `"linux"`, `"lynx"`, `"osx"`, `"msdos"`, `"nacl"`, `"netbsd"`, `"openbsd"`, `"os2"`, `"os2emx"`, `"osf"`, `"qnx"`, `"qnx6"`, `"reliant"`, `"sco"`, `"solaris"`, `"symbian"`, `"ultrix"`, `"unix"`, `"unixware"`, `"vxworks"`, `"windows"`, `"windowsce"`, `"windowsphone"`, `"winrt"`

Specifies the OS you want to build the project for. This is typically set in a profile.

## architecture

Type: | `string`

Specifies the target platform's processor architecture. This is typically set in a profile. Currently used values are: `"x86"`, `"x86_64"` and `"arm"`.

## endianness

Type: | `string`
Allowed Values: | `"big"`, `"little"`, `"mixed"`
Default: | `undefined`

Specifies the endianness of the target platform's processor architecture.

## toolchain

Type: | `stringList`
Allowed Values: | `"gcc"`, `"llvm"`, `"clang"`, `"mingw"`, `"msvc"`

Specifies the attributes of the toolchain that is going to be used for this build.

## sysroot

Type: | `string`
Default: | `undefined`

Specifies the sysroot of the target platform. This property is typically set in a profile for cross-compiling.

## install

Type: | `bool`
Default: | `false`

Specifies whether to install a certain set of files. This is typically set in a `Group` item to mark a number of files as installable.

## installDir

Type: | `string`
Default: | `undefined`

Specifies the installation directory for the files of a product or a `Group`. The value of this property is a path that is relative to `installPrefix`.

## installPrefix

Type: | `string`
Default: | `empty`

Specifies the global installation prefix. It is implicitly prepended to all values of `installDir`. The `installPrefix` itself is relative to the install root, which is not a property of qbs, but an external installation parameter.

## pathListSeparator

Type: | `string`

Holds the platform-specific separator for path list that is used in environment variables or other contexts. E.g. on Windows is this `";"`, on Unix derivatives `":"`.