From 6fd4394e939f6bd5231076a4166ce521b8e0b3a7 Mon Sep 17 00:00:00 2001 From: ctw-ian Date: Thu, 6 Jul 2023 16:09:37 +0800 Subject: [PATCH] Add api version Issue:https://gitee.com/openharmony/arkcompiler_runtime_core/issues/I7IZCE Signed-off-by: ctw-ian Change-Id: I8dea6fbc696e07434ba2cc03621ce01888242a93 --- ace-loader/src/genAbc-plugin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ace-loader/src/genAbc-plugin.js b/ace-loader/src/genAbc-plugin.js index 42d525e..ebb67f1 100644 --- a/ace-loader/src/genAbc-plugin.js +++ b/ace-loader/src/genAbc-plugin.js @@ -509,6 +509,11 @@ function initAbcEnv() { if (isDebug) { args.push('--debug-info'); } + if (process.env.minPlatformVersion && process.env.minPlatformVersion !== 'undefined' && + process.env.minPlatformVersion !== '8') { + args.push('--target-api-version'); + args.push(process.env.minPlatformVersion); + } } else { console.debug(red, `ERROR: please set panda module`, reset); } -- Gitee