adapt SDK on OpenHarmony

Issue: IA7C9S

Signed-off-by: wuhailong <wuhailong22@huawei.com>
Change-Id: I664196f03af9404363a2ab10693416fe643d018f
This commit is contained in:
wuhailong 2024-06-16 21:21:07 +08:00
parent e97b60a51e
commit fbf79db3d6
4 changed files with 33 additions and 7 deletions

View File

@ -101,6 +101,18 @@ group("ark_host_mac_tools_packages") {
}
}
if (!ark_standalone_build) {
group("ark_host_ohos_tools_packages") {
deps = []
if (host_os != "mac") {
deps += [ "$ark_root/disassembler:ark_disasm($build_root/toolchain/ohos:ohos_clang_arm64)" ]
}
foreach(plugin, enabled_plugins) {
deps += [ "$ark_root/plugins/$plugin:ark_host_ohos_tools_packages" ]
}
}
}
# Common config for ark source
config("ark_config") {
visibility = [
@ -150,11 +162,20 @@ config("ark_config") {
"PANDA_TARGET_MOBILE_WITH_NATIVE_LIBS",
]
} else if (is_ohos) {
defines += [
"PANDA_TARGET_OHOS",
"PANDA_TARGET_UNIX",
"PANDA_USE_FUTEX",
]
if (is_build_sdk) {
defines += [
"PANDA_TARGET_OHOS",
"PANDA_TARGET_UNIX",
"PANDA_WITH_BYTECODE_OPTIMIZER",
"PANDA_USE_FUTEX",
]
} else {
defines += [
"PANDA_TARGET_OHOS",
"PANDA_TARGET_UNIX",
"PANDA_USE_FUTEX",
]
}
} else {
defines += [
"PANDA_TARGET_UNIX",

View File

@ -45,7 +45,7 @@ sdk_libc_secshared_config =
"$ark_third_party_root/bounds_checking_function:libsec_public_config"
if (is_mingw || is_mac || is_linux || target_os == "ios" ||
target_os == "android") {
target_os == "android" || (is_build_sdk && is_ohos)) {
sdk_libc_secshared_dep = "bounds_checking_function:libsec_static"
}

View File

@ -26,3 +26,8 @@ if (!ark_standalone_build) {
}
ark_root = "//arkcompiler/runtime_core"
is_build_sdk = false
if (device_name == "sdk") {
is_build_sdk = true
}

View File

@ -140,7 +140,7 @@ ohos_executable("ark_disasm") {
external_deps = [ sdk_libc_secshared_dep ]
libs = platform_libs
if (!is_mac && !is_mingw) {
if (!is_mac && !is_mingw && (is_build_sdk && !is_ohos)) {
ldflags = platform_ldflags
}