forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[runtime] Create a version of our runtime that can be used with Nativ…
…eAOT. This contributes towards xamarin#17339.
- Loading branch information
1 parent
a57695b
commit a223cfb
Showing
7 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ | ||
/* | ||
* Authors: Rolf Bjarne Kvinge | ||
* | ||
* Copyright (C) 2023 Microsoft Corp. | ||
* | ||
*/ | ||
|
||
#if defined (NATIVEAOT) | ||
|
||
#include <sys/stat.h> | ||
#include <inttypes.h> | ||
#include <pthread.h> | ||
#include <sys/mman.h> | ||
#include <dlfcn.h> | ||
|
||
#include "product.h" | ||
#include "runtime-internal.h" | ||
#include "slinked-list.h" | ||
#include "xamarin/xamarin.h" | ||
#include "xamarin/coreclr-bridge.h" | ||
|
||
typedef void (*xamarin_runtime_initialize_decl)(struct InitializationOptions* options, GCHandle* exception_gchandle); | ||
void | ||
xamarin_bridge_call_runtime_initialize (struct InitializationOptions* options, GCHandle* exception_gchandle) | ||
{ | ||
void *del = dlsym (RTLD_DEFAULT, "xamarin_objcruntime_runtime_nativeaotinitialize"); | ||
if (del == NULL) | ||
xamarin_assertion_message ("xamarin_bridge_call_runtime_initialize: failed to load xamarin_objcruntime_runtime_nativeaotinitialize: %s\n", dlerror ()); | ||
|
||
xamarin_runtime_initialize_decl runtime_initialize = (xamarin_runtime_initialize_decl) del; | ||
runtime_initialize (options, exception_gchandle); | ||
} | ||
|
||
#endif // NATIVEAOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters