From a16d501257e74b92dcd154802ad69ecc47d001d7 Mon Sep 17 00:00:00 2001 From: johnche Date: Fri, 17 May 2024 16:07:11 +0000 Subject: [PATCH] [unity]add linux arm64 build --- unity/cli/make.mts | 11 +++++++++++ unity/native_src/cmake/backends.json | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/unity/cli/make.mts b/unity/cli/make.mts index afce468d96..a50203f796 100644 --- a/unity/cli/make.mts +++ b/unity/cli/make.mts @@ -179,6 +179,17 @@ const platformCompileConfig = { cd("..") assert.equal(0, exec(`cmake --build ${CMAKE_BUILD_PATH} --config ${options.config}`).code) + return `${CMAKE_BUILD_PATH}/lib${cmakeAddedLibraryName}.so`; + } + }, + 'arm64': { + outputPluginPath: 'Linux/libs/arm64/', + hook: function (CMAKE_BUILD_PATH: string, options: BuildOptions, cmakeAddedLibraryName: string, cmakeDArgs: string) { + cd(CMAKE_BUILD_PATH); + assert.equal(0, exec(`cmake ${cmakeDArgs} -DJS_ENGINE=${options.backend} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=${options.config} ..`).code) + cd("..") + assert.equal(0, exec(`cmake --build ${CMAKE_BUILD_PATH} --config ${options.config}`).code) + return `${CMAKE_BUILD_PATH}/lib${cmakeAddedLibraryName}.so`; } } diff --git a/unity/native_src/cmake/backends.json b/unity/native_src/cmake/backends.json index 08320e819b..f9b1ccd45b 100644 --- a/unity/native_src/cmake/backends.json +++ b/unity/native_src/cmake/backends.json @@ -252,6 +252,9 @@ "linux": { "x64": [ "/Lib/Linux/libwee8.a" + ], + "arm64": [ + "/Lib/Linux_arm64/libwee8.a" ] } }, @@ -312,6 +315,9 @@ "linux": { "x64": [ "/Lib/Linux/libwee8.a" + ], + "arm64": [ + "/Lib/Linux_arm64/libwee8.a" ] } }, @@ -452,4 +458,4 @@ } } } -} \ No newline at end of file +}