# Copyright (c) 2023 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") ohos_prebuilt_shared_library("libjsvm") { deps = [ ":build_libjsvm" ] source = "$target_gen_dir/libjsvm.so" subsystem_name = "arkui" part_name = "napi" install_enable = true install_images = [ "system" ] innerapi_tags = [ "ndk" ] } action("build_libjsvm") { external_deps = [ "node:node_header_notice", "resource_schedule_service:ressched_client", ] deps = [ "//third_party/musl:musl_all" ] script = "build_jsvm.sh" sources = [] outputs = [ "$target_gen_dir/libjsvm.so" ] args = [ "--target_gen_dir", rebase_path("$target_gen_dir"), "--target_cpu", "$target_cpu", "--prefix", rebase_path("$clang_base_path/bin"), "--sysroot", rebase_path("$musl_sysroot"), "--node_path", rebase_path("//third_party/node"), ] if (use_clang_coverage) { args += [ "--target_clang_coverage", "$use_clang_coverage", ] } }