This commit is contained in:
Wojtek Figat
2023-04-12 11:21:55 +02:00
parent 1a604e24a0
commit 99566a0f0f
3 changed files with 9 additions and 9 deletions

View File

@@ -28,7 +28,7 @@
#include "Engine/Profiler/ProfilerCPU.h" #include "Engine/Profiler/ProfilerCPU.h"
#include "Engine/Threading/Threading.h" #include "Engine/Threading/Threading.h"
#include "Engine/Debug/Exceptions/CLRInnerException.h" #include "Engine/Debug/Exceptions/CLRInnerException.h"
#if DOTNET_HOST_CORECRL #if DOTNET_HOST_CORECLR
#include <nethost.h> #include <nethost.h>
#include <coreclr_delegates.h> #include <coreclr_delegates.h>
#include <hostfxr.h> #include <hostfxr.h>
@@ -1478,7 +1478,7 @@ void* GetCustomAttribute(const MClass* klass, const MClass* attributeClass)
return CallStaticMethod<void*, void*, void*>(GetCustomAttributePtr, klass->GetNative(), attributeClass ? attributeClass->GetNative() : nullptr); return CallStaticMethod<void*, void*, void*>(GetCustomAttributePtr, klass->GetNative(), attributeClass ? attributeClass->GetNative() : nullptr);
} }
#if DOTNET_HOST_CORECRL #if DOTNET_HOST_CORECLR
const char_t* NativeInteropTypeName = FLAX_CORECLR_TEXT("FlaxEngine.Interop.NativeInterop, FlaxEngine.CSharp"); const char_t* NativeInteropTypeName = FLAX_CORECLR_TEXT("FlaxEngine.Interop.NativeInterop, FlaxEngine.CSharp");
hostfxr_initialize_for_runtime_config_fn hostfxr_initialize_for_runtime_config; hostfxr_initialize_for_runtime_config_fn hostfxr_initialize_for_runtime_config;

View File

@@ -49,7 +49,7 @@ public class nethost : ThirdPartyModule
case TargetPlatform.XboxOne: case TargetPlatform.XboxOne:
case TargetPlatform.XboxScarlett: case TargetPlatform.XboxScarlett:
case TargetPlatform.UWP: case TargetPlatform.UWP:
if (hostRuntime.Type == DotNetSdk.HostType.CoreCRL) if (hostRuntime.Type == DotNetSdk.HostType.CoreCLR)
{ {
options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "nethost.lib")); options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "nethost.lib"));
options.DependencyFiles.Add(Path.Combine(hostRuntime.Path, "nethost.dll")); options.DependencyFiles.Add(Path.Combine(hostRuntime.Path, "nethost.dll"));
@@ -93,10 +93,10 @@ public class nethost : ThirdPartyModule
options.PublicDefinitions.Add("DOTNET_HOST_RUNTIME_IDENTIFIER=" + DotNetSdk.GetHostRuntimeIdentifier(options.Platform.Target, options.Architecture)); options.PublicDefinitions.Add("DOTNET_HOST_RUNTIME_IDENTIFIER=" + DotNetSdk.GetHostRuntimeIdentifier(options.Platform.Target, options.Architecture));
switch (hostRuntime.Type) switch (hostRuntime.Type)
{ {
case DotNetSdk.HostType.CoreCRL: case DotNetSdk.HostType.CoreCLR:
{ {
// Use CoreCRL for runtime hosting // Use CoreCLR for runtime hosting
options.PublicDefinitions.Add("DOTNET_HOST_CORECRL"); options.PublicDefinitions.Add("DOTNET_HOST_CORECLR");
options.PublicIncludePaths.Add(hostRuntime.Path); options.PublicIncludePaths.Add(hostRuntime.Path);
break; break;
} }

View File

@@ -32,9 +32,9 @@ namespace Flax.Build
public enum HostType public enum HostType
{ {
/// <summary> /// <summary>
/// Core CRL runtime. /// Core CLR runtime.
/// </summary> /// </summary>
CoreCRL, CoreCLR,
/// <summary> /// <summary>
/// Old-school Mono runtime. /// Old-school Mono runtime.
@@ -73,7 +73,7 @@ namespace Flax.Build
case TargetPlatform.Windows: case TargetPlatform.Windows:
case TargetPlatform.Linux: case TargetPlatform.Linux:
case TargetPlatform.Mac: case TargetPlatform.Mac:
Type = HostType.CoreCRL; Type = HostType.CoreCLR;
break; break;
default: default:
Type = HostType.Mono; Type = HostType.Mono;