[registrar] Define CORECLR_RUNTIME when in the generated registrar code for CoreCLR (#11584)

This makes sure that we build the right thing, our shipped headers behave
differently whether CORECLR_RUNTIME is defined or not.
This commit is contained in:
Rolf Bjarne Kvinge 2021-05-18 07:36:29 +02:00 коммит произвёл GitHub
Родитель b00b354f04
Коммит 0e957d347f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -4882,6 +4882,11 @@ namespace Registrar {
methods.WriteLine ("#define DEBUG 1"); methods.WriteLine ("#define DEBUG 1");
} }
if (App.XamarinRuntime == XamarinRuntime.CoreCLR) {
header.WriteLine ("#define CORECLR_RUNTIME");
methods.WriteLine ("#define CORECLR_RUNTIME");
}
header.WriteLine ("#include <stdarg.h>"); header.WriteLine ("#include <stdarg.h>");
if (SupportsModernObjectiveC) { if (SupportsModernObjectiveC) {
methods.WriteLine ("#include <xamarin/xamarin.h>"); methods.WriteLine ("#include <xamarin/xamarin.h>");