1/* Target hook definitions for the Rust front end.
2 Copyright (C) 2022-2024 Free Software Foundation, Inc.
3
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.
8
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.
13
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/>. */
17
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. */
20
21#include "target-hooks-macros.h"
22
23#undef HOOK_TYPE
24#define HOOK_TYPE "Rust Target Hook"
25
26HOOK_VECTOR (TARGETRUSTM_INITIALIZER, gcc_targetrustm)
27
28#undef HOOK_PREFIX
29#define HOOK_PREFIX "TARGET_"
30
31/* Environmental CPU info and features (e.g. endianness, pointer size) relating
32 to the target CPU. */
33DEFHOOK
34(rust_cpu_info,
35 "Declare all environmental CPU info and features relating to the target CPU\n\
36using the function @code{rust_add_target_info}, which takes a string\n\
37representing the feature key and a string representing the feature value.\n\
38Configuration pairs predefined by this hook apply to all files that are being\n\
39compiled.",
40 void, (void),
41 hook_void_void)
42
43/* Environmental OS info relating to the target OS. */
44DEFHOOK
45(rust_os_info,
46 "Similar to @code{TARGET_RUST_CPU_INFO}, but is used for configuration info\n\
47relating to the target operating system.",
48 void, (void),
49 hook_void_void)
50
51/* Close the 'struct gcc_targetrustm' definition. */
52HOOK_VECTOR_END (C90_EMPTY_HACK)
53

source code of gcc/rust/rust-target.def