/* Target hook definitions for the Rust front end. Copyright (C) 2022-2024 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING3. If not see . */ /* See target-hooks-macros.h for details of macros that should be provided by the including file, and how to use them here. */ #include "target-hooks-macros.h" #undef HOOK_TYPE #define HOOK_TYPE "Rust Target Hook" HOOK_VECTOR (TARGETRUSTM_INITIALIZER, gcc_targetrustm) #undef HOOK_PREFIX #define HOOK_PREFIX "TARGET_" /* Environmental CPU info and features (e.g. endianness, pointer size) relating to the target CPU. */ DEFHOOK (rust_cpu_info, "Declare all environmental CPU info and features relating to the target CPU\n\ using the function @code{rust_add_target_info}, which takes a string\n\ representing the feature key and a string representing the feature value.\n\ Configuration pairs predefined by this hook apply to all files that are being\n\ compiled.", void, (void), hook_void_void) /* Environmental OS info relating to the target OS. */ DEFHOOK (rust_os_info, "Similar to @code{TARGET_RUST_CPU_INFO}, but is used for configuration info\n\ relating to the target operating system.", void, (void), hook_void_void) /* Close the 'struct gcc_targetrustm' definition. */ HOOK_VECTOR_END (C90_EMPTY_HACK)