Skip to content

Commit 5574c31

Browse files
committed
Share more code between MonoVM and CoreCLR hosts
1 parent 3abcc6d commit 5574c31

36 files changed

+40
-3498
lines changed

src/native/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ if(IS_CLR_RUNTIME)
235235
${RUNTIME_INCLUDE_DIR}
236236
)
237237
endmacro()
238+
else()
239+
include_directories(mono)
238240
endif()
239241

240242
#
@@ -262,6 +264,13 @@ macro(xa_add_compile_definitions TARGET)
262264
${TARGET}
263265
PRIVATE
264266
TARGET_ANDROID
267+
XA_HOST_CLR
268+
)
269+
else()
270+
target_compile_definitions(
271+
${TARGET}
272+
PRIVATE
273+
XA_HOST_MONOVM
265274
)
266275
endif()
267276
endmacro()

src/native/clr/host/generate-pinvoke-tables.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <unordered_set>
2727
#include <vector>
2828

29-
#include "xxhash.hh"
29+
#include <shared/xxhash.hh>
3030

3131
namespace fs = std::filesystem;
3232
using namespace xamarin::android;

src/native/clr/include/constants.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <string_view>
77

8-
#include "shared/cpp-util.hh"
8+
#include <shared/cpp-util.hh>
99

1010
namespace xamarin::android {
1111
class Constants

src/native/clr/include/host/host.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <jni.h>
66
#include <corehost/host_runtime_contract.h>
77

8-
#include "../runtime-base/jni-wrappers.hh"
8+
#include <runtime-base/jni-wrappers.hh>
99
#include "../runtime-base/timing.hh"
1010
#include "../shared/log_types.hh"
1111
#include "managed-interface.hh"

src/native/clr/include/host/pinvoke-override.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#endif
2929

3030
#include "../runtime-base/monodroid-dl.hh"
31-
#include "../shared/xxhash.hh"
31+
#include <shared/xxhash.hh>
3232

3333
namespace xamarin::android {
3434
struct PinvokeEntry

src/native/clr/include/runtime-base/android-system.hh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include "../constants.hh"
1010
#include "../shared/log_types.hh"
1111
#include "../runtime-base/cpu-arch.hh"
12-
#include "jni-wrappers.hh"
13-
#include "strings.hh"
12+
#include <runtime-base/jni-wrappers.hh>
13+
#include <runtime-base/strings.hh>
1414
#include "util.hh"
1515

1616
struct BundledProperty;

src/native/clr/include/runtime-base/jni-wrappers.hh

-209
This file was deleted.

src/native/clr/include/runtime-base/logger.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <string_view>
66

77
#include <shared/log_types.hh>
8-
#include "strings.hh"
8+
#include <runtime-base/strings.hh>
99

1010
namespace xamarin::android {
1111
class Logger

src/native/clr/include/runtime-base/monodroid-dl.hh

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
#include <java-interop-dlfcn.h>
99

10-
#include "../shared/xxhash.hh"
10+
#include <shared/xxhash.hh>
1111
#include "../xamarin-app.hh"
1212

1313
#include "android-system.hh"
14-
#include "search.hh"
14+
#include <runtime-base/search.hh>
1515
#include "startup-aware-lock.hh"
1616

1717
namespace xamarin::android

src/native/clr/include/runtime-base/search.hh

-60
This file was deleted.

0 commit comments

Comments
 (0)