gccrs: Make proc macro definition cdecl
commitce7688d7b0c0b4940adb2b08908df5b2b0ca702e
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 4 Sep 2023 11:22:21 +0000 (4 13:22 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:09:30 +0000 (16 19:09 +0100)
treec1070193ff133fced657dfc2d83c5495553240fe
parent32dcd3ec99186a3fe6c01d36029a519a6cd6e109
gccrs: Make proc macro definition cdecl

We need to make sure proc macros have the C abi in order to be called by
the compiler with dlopen.

gcc/rust/ChangeLog:

* backend/rust-compile-base.cc (HIRCompileBase::setup_fndecl):
Add proc macro handlers dispatch.
(handle_proc_macro_common): Add a function for common behavior
between all kinds of proc macros.
* backend/rust-compile-base.h: Add function prototypes.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/backend/rust-compile-base.cc
gcc/rust/backend/rust-compile-base.h