[03/14] rust: Reintroduce TARGET_RUST_OS_INFO hook
Checks
Commit Message
From: Iain Buclaw <ibuclaw@gdcproject.org>
gcc/ChangeLog:
* doc/tm.texi: Regenerate.
* doc/tm.texi.in: Document TARGET_RUST_OS_INFO.
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::init): Call
targetrustm.rust_os_info.
* rust-target.def (rust_os_info): New hook.
---
gcc/doc/tm.texi | 5 +++++
gcc/doc/tm.texi.in | 2 ++
gcc/rust/rust-session-manager.cc | 1 +
gcc/rust/rust-target.def | 8 ++++++++
4 files changed, 16 insertions(+)
@@ -10975,6 +10975,11 @@ Configuration pairs predefined by this hook apply to all files that are being
compiled.
@end deftypefn
+@deftypefn {Rust Target Hook} void TARGET_RUST_OS_INFO (void)
+Similar to @code{TARGET_RUST_CPU_INFO}, but is used for configuration info
+relating to the target operating system.
+@end deftypefn
+
@node Named Address Spaces
@section Adding support for named address spaces
@cindex named address spaces
@@ -7150,6 +7150,8 @@ floating-point support; they are not included in this mechanism.
@hook TARGET_RUST_CPU_INFO
+@hook TARGET_RUST_OS_INFO
+
@node Named Address Spaces
@section Adding support for named address spaces
@cindex named address spaces
@@ -140,6 +140,7 @@ Session::init ()
{
// initialize target hooks
targetrustm.rust_cpu_info ();
+ targetrustm.rust_os_info ();
// target-independent values that should exist in all targets
options.target_data.insert_key_value_pair ("target_pointer_width",
@@ -40,5 +40,13 @@ 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)