[cxx] Make the externC of icalls configuration-dependent instead of always. (mono...
authorJay Krell <jaykrell@microsoft.com>
Tue, 14 Jan 2020 18:28:54 +0000 (10:28 -0800)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 14 Jan 2020 18:28:54 +0000 (19:28 +0100)
commit422e74ea8c722eaab6ec5e8c365a215da46b20c1
treeb9a8c8ff211425f8dff07cab674b9540ea60c9ec
parent4eecc94fd144af1ac2a980abd03d966b410ac3b5
[cxx] Make the externC of icalls configuration-dependent instead of always. (mono/mono#17573)

There are pluses and minuses here:

 + Minimize externC.

 + Maximimze typesafe linkage.

 - Minimize configuration-sensitivity.

 - Maximize commonality across all configurations, so that
   success in one configuration maximally but not 100% implies
   success in others (which is why to avoid `#if` in general,
   to contribute toward compilation success).

 + Use higher level macros to explain reason.
   Even if ICALL_EXTERN_C was always externC (presently not),
   using it instead of plain G_EXTERN_C offers a builtin comment.

Commit migrated from https://github.com/mono/mono/commit/5237696f65cda0f079562838990b4effd4d65eee
src/mono/mono/mini/jit-icalls.h