From 43d2aed644cc5f4f6be4c3d0f9d81b807e5201fb Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Mon, 16 Nov 2015 00:22:56 -0500 Subject: [PATCH] [runtime] Add runtime support for explicit offset files. Explicit offset files are provided by configuring mono with --with-cross-offsets List of original contributors: Joao Matos Zoltan Varga Rolf Bjarne Kvinge Rodrigo Kumpera --- mono/metadata/object-offsets.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mono/metadata/object-offsets.h b/mono/metadata/object-offsets.h index a79e3508e0f..b4737b3b792 100644 --- a/mono/metadata/object-offsets.h +++ b/mono/metadata/object-offsets.h @@ -17,17 +17,22 @@ Output defines: HAS_CROSS_COMPILER_OFFSETS - if set, it means we found some cross offsets, it doesnt mean we'll use it. USED_CROSS_COMPILER_OFFSETS - if set, it means we used the cross offsets + +Environment defines (from config.h and CFLAGS): + +MONO_GENERATING_OFFSETS - Set by an offsets generating tool to disable the usage of any (possibly non-existing) generated header. +MONO_OFFSETS_FILE - Name of the header file containing the offsets to be used. + */ #undef HAS_CROSS_COMPILER_OFFSETS #undef USED_CROSS_COMPILER_OFFSETS -#ifdef ENABLE_EXTENSION_MODULE -#include "../../../mono-extensions/mono/metadata/object-offsets.h" +#if !defined (MONO_GENERATING_OFFSETS) && defined (MONO_OFFSETS_FILE) +#include MONO_OFFSETS_FILE #endif - #ifndef USED_CROSS_COMPILER_OFFSETS DECL_ALIGN(gint8) -- 2.25.1