View source code
Display the source code in dmd/target.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.


Handles target-specific parameters

In order to allow for cross compilation, when the compiler produces a binary for a different platform than it is running on, target information needs to be abstracted. This is done in this module, primarily through Target.


While DMD itself does not support cross-compilation, GDC and LDC do. Hence, this module is (sometimes heavily) modified by them, and contributors should review how their changes affect them.

See Also

- Target Triplets - LDC repository - GDC repository




addDefaultVersionIdentifiers(params, tgt) Add default version identifier for dmd, and set the target platform in params.


Target Describes a back-end target. At present it is incomplete, but in the future it should grow to contain most or all target machine and target O/S specific information.
TargetC Functions and variables specific to interfacing with extern(C) ABI.
TargetCPP Functions and variables specific to interface with extern(C++) ABI.
TargetObjC Functions and variables specific to interface with extern(Objective-C) ABI.

Global variables

target Target


Walter Bright


Boost License 1.0