Move PREFERRED_DEBUGGING_TYPE define in pa64-hpux.h to pa.h
[official-gcc.git] / gcc / d / d-target.def
blob67647515cf274975e788e9110ec58f126b47096e
1 /* d-target.def -- Target hook definitions for the D front end.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 3, or (at your option) any
7 later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>. */
18 /* See target-hooks-macros.h for details of macros that should be
19 provided by the including file, and how to use them here. */
21 #include "target-hooks-macros.h"
23 #undef HOOK_TYPE
24 #define HOOK_TYPE "D Target Hook"
26 HOOK_VECTOR (TARGETDM_INITIALIZER, gcc_targetdm)
28 #undef HOOK_PREFIX
29 #define HOOK_PREFIX "TARGET_"
31 /* Environmental version identifiers relating to the target CPU. */
32 DEFHOOK
33 (d_cpu_versions,
34 "Declare all environmental version identifiers relating to the target CPU\n\
35 using the function @code{builtin_version}, which takes a string representing\n\
36 the name of the version. Version identifiers predefined by this hook apply\n\
37 to all modules that are being compiled and imported.",
38 void, (void),
39 hook_void_void)
41 /* Environmental version identifiers relating to the target OS. */
42 DEFHOOK
43 (d_os_versions,
44 "Similarly to @code{TARGET_D_CPU_VERSIONS}, but is used for versions\n\
45 relating to the target operating system.",
46 void, (void),
47 hook_void_void)
49 /* getTargetInfo keys relating to the target CPU. */
50 DEFHOOK
51 (d_register_cpu_target_info,
52 "Register all target information keys relating to the target CPU using the\n\
53 function @code{d_add_target_info_handlers}, which takes a\n\
54 @samp{struct d_target_info_spec} (defined in @file{d/d-target.h}). The keys\n\
55 added by this hook are made available at compile time by the\n\
56 @code{__traits(getTargetInfo)} extension, the result is an expression\n\
57 describing the requested target information.",
58 void, (void),
59 hook_void_void)
61 /* getTargetInfo keys relating to the target OS. */
62 DEFHOOK
63 (d_register_os_target_info,
64 "Same as @code{TARGET_D_CPU_TARGET_INFO}, but is used for keys relating to\n\
65 the target operating system.",
66 void, (void),
67 hook_void_void)
69 /* ModuleInfo section name and brackets. */
70 DEFHOOKPOD
71 (d_minfo_section,
72 "Contains the name of the section in which module info references should be\n\
73 placed. This section is expected to be bracketed by two symbols to indicate\n\
74 the start and end address of the section, so that the runtime library can\n\
75 collect all modules for each loaded shared library and executable. The\n\
76 default value of @code{NULL} disables the use of sections altogether.",
77 const char *, NULL)
79 DEFHOOKPOD
80 (d_minfo_start_name,
81 "If @code{TARGET_D_MINFO_SECTION} is defined, then this must also be defined\n\
82 as the name of the symbol indicating the start address of the module info\n\
83 section",
84 const char *, NULL)
86 /* The name of the ModuleInfo section. */
87 DEFHOOKPOD
88 (d_minfo_end_name,
89 "If @code{TARGET_D_MINFO_SECTION} is defined, then this must also be defined\n\
90 as the name of the symbol indicating the end address of the module info\n\
91 section",
92 const char *, NULL)
94 /* The "stdcall" convention is really supported on 32-bit x86/Windows only.
95 The following hook is a helper to determine whether to apply the attribute
96 on declarations with `extern(System)' and `extern(Windows)' linkage. */
97 DEFHOOK
98 (d_has_stdcall_convention,
99 "Returns @code{true} if the target supports the stdcall calling convention.\n\
100 The hook should also set @var{link_system} to @code{1} if the @code{stdcall}\n\
101 attribute should be applied to functions with @code{extern(System)} linkage,\n\
102 and @var{link_windows} to @code{1} to apply @code{stdcall} to functions with\n\
103 @code{extern(Windows)} linkage.",
104 bool, (unsigned int *link_system, unsigned int *link_windows),
105 hook_bool_uintp_uintp_false)
107 /* True if instantiations are always COMDAT if they have external linkage. */
108 DEFHOOKPOD
109 (d_templates_always_comdat,
110 "This flag is true if instantiated functions and variables are always COMDAT\n\
111 if they have external linkage. If this flag is false, then instantiated\n\
112 decls will be emitted as weak symbols. The default is @code{false}.",
113 bool, false)
115 /* Close the 'struct gcc_targetdm' definition. */
116 HOOK_VECTOR_END (C90_EMPTY_HACK)