@@ -46,6 +46,8 @@ if(CC_USES_SYSTEM_ARCH_SH OR NOT CHAKRACORE_BUILD_SH)
46
46
set (CC_TARGETS_AMD64_SH 1)
47
47
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l" )
48
48
set (CC_TARGETS_ARM_SH 1)
49
+ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" )
50
+ set (CC_TARGETS_ARM64_SH 1)
49
51
endif ()
50
52
unset (CC_USES_SYSTEM_ARCH_SH CACHE )
51
53
endif ()
@@ -56,6 +58,11 @@ elseif(CC_TARGETS_ARM_SH)
56
58
set (CC_TARGETS_ARM 1)
57
59
add_definitions (-D_ARM_=1)
58
60
set (CMAKE_SYSTEM_PROCESSOR "armv7l" )
61
+ elseif (CC_TARGETS_ARM64_SH)
62
+ add_definitions (-D_ARM64_=1)
63
+ add_definitions (-D__arm64__=1)
64
+ set (CC_TARGETS_ARM64 1)
65
+ set (CMAKE_SYSTEM_PROCESSOr "arm64" )
59
66
elseif (CC_TARGETS_X86_SH)
60
67
set (CC_TARGETS_X86 1)
61
68
set (CMAKE_SYSTEM_PROCESSOR "i386" )
@@ -273,8 +280,15 @@ elseif(CC_TARGETS_ARM)
273
280
# reduce link time memory usage
274
281
set (LINKER_REDUCED_MEMORY "-Xlinker --no-keep-memory" )
275
282
endif ()
283
+ elseif (CC_TARGETS_ARM64)
284
+ add_definitions (-D__aarch64__)
285
+ add_definitions (-DTARGET_64)
286
+ add_definitions (-D_M_ARM32_OR_ARM64)
287
+ if (CC_TARGET_OS_OSX)
288
+ add_compile_options (-arch arm64)
289
+ endif ()
276
290
else ()
277
- message (FATAL_ERROR "Only AMD64, ARM and I386 are supported" )
291
+ message (FATAL_ERROR "Only AMD64, ARM, ARM64 and I386 are supported" )
278
292
endif ()
279
293
280
294
if (CAN_BUILD_WABT)
@@ -341,7 +355,10 @@ if(CLR_CMAKE_PLATFORM_XPLAT)
341
355
if (CC_TARGETS_AMD64)
342
356
set (IS_64BIT_BUILD 1)
343
357
add_definitions (-D_M_X64 -D_M_AMD64 -D_AMD64_)
344
- endif (CC_TARGETS_AMD64)
358
+ elseif (CC_TARGETS_ARM64)
359
+ set (IS_64BIT_BUILD 1)
360
+ add_definitions (-D_M_ARM64 -D_ARM64_)
361
+ endif ()
345
362
346
363
add_definitions (
347
364
-DUNICODE
@@ -495,6 +512,16 @@ else()
495
512
set (DYN_LIB_EXT "so" )
496
513
endif ()
497
514
515
+ if (CC_TARGETS_ARM64)
516
+ if (CC_TARGET_OS_LINUX)
517
+ message (WARNING "ARM64 linux build has not yet been tested, this build is unsupported." )
518
+ endif ()
519
+ if (BuildJIT)
520
+ message (WARNING "ARM64 Jit not yet functional on platforms other than windows." )
521
+ message (WARNING "For use rather than development please build with Jit disabled --no-jit with ./build.sh or -DDISABLE_JIT=1 if using CMake directly" )
522
+ endif ()
523
+ endif ()
524
+
498
525
################# Write-barrier check/analyze ##################
499
526
if (WB_CHECK_SH OR WB_ANALYZE_SH)
500
527
add_definitions (
0 commit comments