From 27f4ae172a663d2a28185d83a746212e4ead9244 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 17 Feb 2025 15:27:14 +0800 Subject: [PATCH] Build universal package ( x86_64, arm64 ) for simulator. (#18338) --- .github/workflows/native-simulator.yml | 2 ++ native/gulpfile.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/native-simulator.yml b/.github/workflows/native-simulator.yml index a1d90c4aac..899c563e48 100644 --- a/.github/workflows/native-simulator.yml +++ b/.github/workflows/native-simulator.yml @@ -70,4 +70,6 @@ jobs: - name: check result run: | find ./ -name SimulatorApp-Mac + echo "==> Show lipo info: " + lipo -info simulator/Release/SimulatorApp-Mac.app/Contents/MacOS/SimulatorApp-Mac [ -f ./simulator/Release/SimulatorApp-Mac.app/Contents/MacOS/SimulatorApp-Mac ] && exit 0 || exit 1 diff --git a/native/gulpfile.js b/native/gulpfile.js index c2c9b69581..e75b2e2ead 100644 --- a/native/gulpfile.js +++ b/native/gulpfile.js @@ -79,6 +79,7 @@ gulp.task('gen-simulator', async function () { } else { args.push('Xcode'); + args.push(`-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64`); } args.push('-DCC_DEBUG_FORCE=ON','-DUSE_V8_DEBUGGER_FORCE=ON'); args.push(absolutePath('./tools/simulator/frameworks/runtime-src/')); @@ -111,7 +112,7 @@ gulp.task('gen-simulator', async function () { await new Promise((resolve, reject) => { let makeArgs = ['--build', simulatorProject]; if (!isWin32) { - makeArgs = makeArgs.concat(['--config', 'Release', '--', '-quiet', '-arch', 'x86_64']); + makeArgs = makeArgs.concat(['--config', 'Release', '--', '-quiet']); } else { makeArgs = makeArgs.concat(['--config', 'Release']); }