mirror of
https://gitee.com/openharmony/arkcompiler_runtime_core
synced 2024-10-06 21:34:16 +00:00
adapt SDK on OpenHarmony
Issue: #IAMQRN Signed-off-by: wuhailong <wuhailong22@huawei.com> (cherry picked commit from <gitee.com//openharmony/arkcompiler_runtime_core/commit/fbf79db3d63eaf6d246ee9b57e68bfeb558bfb00>
This commit is contained in:
parent
d22b36afb8
commit
8810be64ea
31
BUILD.gn
31
BUILD.gn
@ -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
|
# Common config for ark source
|
||||||
config("ark_config") {
|
config("ark_config") {
|
||||||
visibility = [
|
visibility = [
|
||||||
@ -150,11 +162,20 @@ config("ark_config") {
|
|||||||
"PANDA_TARGET_MOBILE_WITH_NATIVE_LIBS",
|
"PANDA_TARGET_MOBILE_WITH_NATIVE_LIBS",
|
||||||
]
|
]
|
||||||
} else if (is_ohos) {
|
} else if (is_ohos) {
|
||||||
defines += [
|
if (is_build_sdk) {
|
||||||
"PANDA_TARGET_OHOS",
|
defines += [
|
||||||
"PANDA_TARGET_UNIX",
|
"PANDA_TARGET_OHOS",
|
||||||
"PANDA_USE_FUTEX",
|
"PANDA_TARGET_UNIX",
|
||||||
]
|
"PANDA_WITH_BYTECODE_OPTIMIZER",
|
||||||
|
"PANDA_USE_FUTEX",
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
defines += [
|
||||||
|
"PANDA_TARGET_OHOS",
|
||||||
|
"PANDA_TARGET_UNIX",
|
||||||
|
"PANDA_USE_FUTEX",
|
||||||
|
]
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
defines += [
|
defines += [
|
||||||
"PANDA_TARGET_UNIX",
|
"PANDA_TARGET_UNIX",
|
||||||
|
@ -52,7 +52,7 @@ sdk_libc_secshared_config =
|
|||||||
"$ark_third_party_root/bounds_checking_function:libsec_public_config"
|
"$ark_third_party_root/bounds_checking_function:libsec_public_config"
|
||||||
|
|
||||||
if (is_mingw || is_mac || is_linux || target_os == "ios" ||
|
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"
|
sdk_libc_secshared_dep = "bounds_checking_function:libsec_static"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,3 +28,8 @@ if (!ark_standalone_build) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ark_root = "//arkcompiler/runtime_core"
|
ark_root = "//arkcompiler/runtime_core"
|
||||||
|
|
||||||
|
is_build_sdk = false
|
||||||
|
if (device_name == "sdk") {
|
||||||
|
is_build_sdk = true
|
||||||
|
}
|
||||||
|
@ -140,7 +140,7 @@ ohos_executable("ark_disasm") {
|
|||||||
external_deps = [ sdk_libc_secshared_dep ]
|
external_deps = [ sdk_libc_secshared_dep ]
|
||||||
|
|
||||||
libs = platform_libs
|
libs = platform_libs
|
||||||
if (!is_mac && !is_mingw) {
|
if (!is_mac && !is_mingw && (is_build_sdk && !is_ohos)) {
|
||||||
ldflags = platform_ldflags
|
ldflags = platform_ldflags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user