]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: proc_macro: Add is_available callback
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 26 Jul 2023 14:48:37 +0000 (16:48 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:56:01 +0000 (18:56 +0100)
commitc0763eac05f6e8adf05a1d94fc80ded1a9e14f2c
treefbb01ba1a4bb9037986247f37f1c9abf8268417c
parentb190aaeff7b4b6e3b96dfe0b5277ccc93ccb9973
gccrs: proc_macro: Add is_available callback

Add a callback from gcc to determine wether the bridge is available or
not.

gcc/rust/ChangeLog:

* expand/rust-proc-macro.cc (available): Add symbol
registration.
(load_macros_array): Likewise.

libgrust/ChangeLog:

* libproc_macro/proc_macro.cc (not_available): Add a
function to express bridge unavailability.
* libproc_macro/proc_macro.h (not_available): Likewise.
* libproc_macro/registration.h: Add symbol type.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/expand/rust-proc-macro.cc
libgrust/libproc_macro/proc_macro.cc
libgrust/libproc_macro/proc_macro.h
libgrust/libproc_macro/registration.h