diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-04-05 20:40:38 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-04-14 15:33:32 +0200 |
commit | 527bc0181d3ea36f11dcaa8aea7704466bd0f01b (patch) | |
tree | 647d414ecd3718ca7a0ef6aede20489ec7fa2ab4 /gcc/d | |
parent | 2ccc05a5141506fde0e20dec702c717fd67bf6ee (diff) | |
download | gcc-527bc0181d3ea36f11dcaa8aea7704466bd0f01b.zip gcc-527bc0181d3ea36f11dcaa8aea7704466bd0f01b.tar.gz gcc-527bc0181d3ea36f11dcaa8aea7704466bd0f01b.tar.bz2 |
d: Add TARGET_D_REGISTER_OS_TARGET_INFO
This allows target platforms that have D support files to defined their
own target-specific information keys.
gcc/ChangeLog:
* doc/tm.texi: Regenerate.
* doc/tm.texi.in (D language and ABI): Add @hook for
TARGET_D_REGISTER_OS_TARGET_INFO.
gcc/d/ChangeLog:
* d-target.cc (Target::_init): Call new targetdm hook to register OS
specific target info keys.
* d-target.def (d_register_os_target_info): New hook.
Diffstat (limited to 'gcc/d')
-rw-r--r-- | gcc/d/d-target.cc | 1 | ||||
-rw-r--r-- | gcc/d/d-target.def | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/d/d-target.cc b/gcc/d/d-target.cc index d576b74..be354d9 100644 --- a/gcc/d/d-target.cc +++ b/gcc/d/d-target.cc @@ -199,6 +199,7 @@ Target::_init (const Param &) /* Initialize target info tables, the keys required by the language are added last, so that the OS and CPU handlers can override. */ targetdm.d_register_cpu_target_info (); + targetdm.d_register_os_target_info (); d_add_target_info_handlers (d_language_target_info); } diff --git a/gcc/d/d-target.def b/gcc/d/d-target.def index cd0397c..aa6bf55 100644 --- a/gcc/d/d-target.def +++ b/gcc/d/d-target.def @@ -58,6 +58,14 @@ describing the requested target information.", void, (void), hook_void_void) +/* getTargetInfo keys relating to the target OS. */ +DEFHOOK +(d_register_os_target_info, + "Same as @code{TARGET_D_CPU_TARGET_INFO}, but is used for keys relating to\n\ +the target operating system.", + void, (void), + hook_void_void) + /* ModuleInfo section name and brackets. */ DEFHOOKPOD (d_minfo_section, |