Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:Target Description Macros and Functions   [Contents][Index]


17.31 D ABI parameters

D Target Hook:voidTARGET_D_CPU_VERSIONS(void)

Declare all environmental version identifiers relating to the target CPUusing the functionbuiltin_version, which takes a string representingthe name of the version. Version identifiers predefined by this hook applyto all modules that are being compiled and imported.

D Target Hook:voidTARGET_D_OS_VERSIONS(void)

Similarly toTARGET_D_CPU_VERSIONS, but is used for versionsrelating to the target operating system.

D Target Hook:voidTARGET_D_REGISTER_CPU_TARGET_INFO(void)

Register all target information keys relating to the target CPU using thefunctiond_add_target_info_handlers, which takes a‘struct d_target_info_spec’ (defined ind/d-target.h). The keysadded by this hook are made available at compile time by the__traits(getTargetInfo) extension, the result is an expressiondescribing the requested target information.

D Target Hook:voidTARGET_D_REGISTER_OS_TARGET_INFO(void)

Same asTARGET_D_CPU_TARGET_INFO, but is used for keys relating tothe target operating system.

D Target Hook:const char *TARGET_D_MINFO_SECTION

Contains the name of the section in which module info references should beplaced. By default, the compiler puts all module info symbols in the"minfo" section. Define this macro to override the string if adifferent section name should be used. This section is expected to bebracketed by two symbolsTARGET_D_MINFO_SECTION_START andTARGET_D_MINFO_SECTION_END to indicate the start and end address ofthe section, so that the runtime library can collect all modules for eachloaded shared library and executable. Setting the value toNULLdisables the use of sections for storing module info altogether.

D Target Hook:const char *TARGET_D_MINFO_SECTION_START

IfTARGET_D_MINFO_SECTION is defined, then this must also be definedas the name of the symbol indicating the start address of the module infosection

D Target Hook:const char *TARGET_D_MINFO_SECTION_END

IfTARGET_D_MINFO_SECTION is defined, then this must also be definedas the name of the symbol indicating the end address of the module infosection

D Target Hook:boolTARGET_D_HAS_STDCALL_CONVENTION(unsigned int *link_system, unsigned int *link_windows)

Returnstrue if the target supports the stdcall calling convention.The hook should also setlink_system to1 if thestdcallattribute should be applied to functions withextern(System) linkage,andlink_windows to1 to applystdcall to functions withextern(Windows) linkage.

D Target Hook:boolTARGET_D_TEMPLATES_ALWAYS_COMDAT

This flag is true if instantiated functions and variables are always COMDATif they have external linkage. If this flag is false, then instantiateddecls will be emitted as weak symbols. The default isfalse.


Next:Rust ABI parameters, Previous:C++ ABI parameters, Up:Target Description Macros and Functions   [Contents][Index]


[8]ページ先頭

©2009-2026 Movatter.jp