Skip to content

Commit

Permalink
add placeholder dn_rt functions for coreclr and nativeaot
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdageek committed Apr 6, 2023
1 parent 15d11fd commit 71fb5c2
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion src/native/containers/dn-rt.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,43 @@ dn_rt_failfast_msgv(const char* fmt, va_list ap);
DN_NORETURN static void
dn_rt_failfast_nomsg(const char* file, int line);

#if defined(FEATUERE_CORECLR)
#if defined(FEATURE_CORECLR)
#include "pal.h"
// TODO: add CoreCLR runtime impl
DN_NORETURN static inline void
dn_rt_failfast_msgv(const char* fmt, va_list ap)
{
RaiseFailFastException(nullptr, nullptr, 0);
}

DN_NORETURN static inline void
dn_rt_failfast_nomsg(const char* file, int line)
{
RaiseFailFastException(nullptr, nullptr, 0);
}

#elif defined(FEATURE_NATIVEAOT)
#include "common.h"
#include "gcenv.h"
#include "CommonTypes.h"
#include "CommonMacros.h"
#include "PalRedhawkCommon.h"
#include "PalRedhawk.h"
#include "rhassert.h"
// TODO: add NativeAOT runtime impl
DN_NORETURN static inline void
dn_rt_failfast_msgv(const char* fmt, va_list ap)
{
RhFailFast();
UNREACHABLE();
}

DN_NORETURN static inline void
dn_rt_failfast_nomsg(const char* file, int line)
{
RhFailFast();
UNREACHABLE();
}
#else
// Mono
#include "dn-rt-mono.h"
Expand Down

0 comments on commit 71fb5c2

Please sign in to comment.