代码拉取完成,页面将自动刷新
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/config/clang/clang.gni")
import("//build/ohos.gni")
import("jsvm.gni")
ohos_prebuilt_etc("jit_enable_list_appid") {
relative_install_dir = "jsvm"
source = "./jit_enable_list_appid.conf"
part_name = "jsvm"
subsystem_name = "arkcompiler"
}
action("copy_v8") {
external_deps = []
deps = []
script = "copy_v8.sh"
sources = []
outputs = [
"$target_gen_dir/libv8_shared.so",
"$target_gen_dir/v8-include",
]
args = [
"--target_gen_dir",
rebase_path("$target_gen_dir"),
rebase_path("//vendor/huawei/binary/artifacts/js_engine_url/"),
target_cpu,
]
}
action("copy_llhttp") {
external_deps = []
deps = []
script = "copy_llhttp.sh"
sources = []
outputs = [
"$target_gen_dir/llhttp/src/api.c",
"$target_gen_dir/llhttp/src/http.c",
"$target_gen_dir/llhttp/src/llhttp.c",
"$target_gen_dir/llhttp/include",
]
args = [
"--target_gen_dir",
rebase_path("$target_gen_dir"),
]
}
config("libv8_config") {
include_dirs = [ "$target_gen_dir/v8-include" ]
}
ohos_prebuilt_shared_library("libv8") {
deps = [ ":copy_v8" ]
source = "$target_gen_dir/libv8_shared.so"
output = "libv8_shared.so"
public_configs = [ ":libv8_config" ]
subsystem_name = "arkcompiler"
part_name = "jsvm"
install_enable = true
install_images = [ "system" ]
}
config("llhttp_config") {
include_dirs = [ "$target_gen_dir/llhttp/include" ]
}
ohos_static_library("llhttp") {
deps = [ ":copy_llhttp" ]
sources = [
"$target_gen_dir/llhttp/src/api.c",
"$target_gen_dir/llhttp/src/http.c",
"$target_gen_dir/llhttp/src/llhttp.c",
]
public_configs = [ ":llhttp_config" ]
subsystem_name = "arkcompiler"
part_name = "jsvm"
}
config("public_jsvm_config") {
include_dirs = [ "interface/kits" ]
}
ohos_prebuilt_shared_library("libjsvm") {
deps = [
":jit_enable_list_appid",
":build_libjsvm",
]
public_configs = [ ":public_jsvm_config" ]
if (is_asan && support_hwasan && use_hwasan) {
source = "$target_gen_dir/asan/libjsvm.so"
} else {
source = "$target_gen_dir/libjsvm.so"
}
subsystem_name = "arkcompiler"
part_name = "jsvm"
install_enable = true
install_images = [ "system" ]
innerapi_tags = [ "ndk" ]
}
action("build_libjsvm") {
external_deps = [
"bounds_checking_function:libsec_static",
"hilog:libhilog",
"hisysevent:libhisysevent",
"hitrace:hitrace_meter",
"icu:shared_icui18n",
"icu:shared_icuuc",
"init:libbegetutil",
"libuv:uv",
"openssl:libcrypto_shared",
"openssl:libssl_shared",
"resource_schedule_service:ressched_client",
"zlib:libz",
]
deps = [
":libv8",
":llhttp",
]
configs = []
script = "build_jsvm.sh"
sources = []
support_and_use_hwasan = support_hwasan && use_hwasan
if (is_asan && support_and_use_hwasan) {
outputs = [ "$target_gen_dir/asan/libjsvm.so" ]
} else {
outputs = [ "$target_gen_dir/libjsvm.so" ]
}
args = [
"--target_gen_dir",
rebase_path("$target_gen_dir"),
"--target_out_dir",
rebase_path("$root_out_dir"),
"--target_cpu",
"$target_cpu",
"--target_platform",
"$target_platform",
"--prefix",
rebase_path("//vendor/huawei/binary/artifacts/js_engine_url/llvm/bin"),
"--sysroot",
rebase_path("$musl_sysroot"),
"--is_asan",
"$is_asan",
"--use_hwasan",
"$support_and_use_hwasan",
"{{include_dirs}}",
"--cmake_path",
rebase_path("//prebuilts/cmake/linux-x86/bin/cmake"),
"--jsvm_path",
rebase_path("."),
]
if (use_clang_coverage) {
args += [
"--target_clang_coverage",
"$use_clang_coverage",
]
}
}
group("jsvm_packages") {
deps = [ ":libjsvm" ]
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。