blob: be46f066d665105dc952696f293c01a0230e2cdb [file] [log] [blame]
/* d-target.def -- Target hook definitions for the D front end.
Copyright (C) 2017-2019 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
<http://www.gnu.org/licenses/>. */
/* 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 "D Target Hook"
HOOK_VECTOR (TARGETDM_INITIALIZER, gcc_targetdm)
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_"
/* Environmental version identifiers relating to the target CPU. */
DEFHOOK
(d_cpu_versions,
"Declare all environmental version identifiers relating to the target CPU\n\
using the function @code{builtin_version}, which takes a string representing\n\
the name of the version. Version identifiers predefined by this hook apply\n\
to all modules that are being compiled and imported.",
void, (void),
hook_void_void)
/* Environmental version identifiers relating to the target OS. */
DEFHOOK
(d_os_versions,
"Similarly to @code{TARGET_D_CPU_VERSIONS}, but is used for versions\n\
relating to the target operating system.",
void, (void),
hook_void_void)
/* The sizeof CRITICAL_SECTION or pthread_mutex_t. */
DEFHOOK
(d_critsec_size,
"Returns the size of the data structure used by the target operating system\n\
for critical sections and monitors. For example, on Microsoft Windows this\n\
would return the @code{sizeof(CRITICAL_SECTION)}, while other platforms that\n\
implement pthreads would return @code{sizeof(pthread_mutex_t)}.",
unsigned, (void),
hook_uint_void_0)
/* Close the 'struct gcc_targetdm' definition. */
HOOK_VECTOR_END (C90_EMPTY_HACK)