1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/config/clang/clang.gni") 15import("//build/ohos.gni") 16 17ohos_prebuilt_shared_library("libjsvm") { 18 deps = [ ":build_libjsvm" ] 19 20 source = "$target_gen_dir/libjsvm.so" 21 subsystem_name = "arkui" 22 part_name = "napi" 23 24 install_enable = true 25 install_images = [ "system" ] 26 innerapi_tags = [ "ndk" ] 27} 28 29action("build_libjsvm") { 30 external_deps = [ 31 "node:node_header_notice", 32 "resource_schedule_service:ressched_client", 33 ] 34 deps = [ "//third_party/musl:musl_all" ] 35 script = "build_jsvm.sh" 36 sources = [] 37 outputs = [ "$target_gen_dir/libjsvm.so" ] 38 args = [ 39 "--target_gen_dir", 40 rebase_path("$target_gen_dir"), 41 "--target_cpu", 42 "$target_cpu", 43 "--prefix", 44 rebase_path("$clang_base_path/bin"), 45 "--sysroot", 46 rebase_path("$musl_sysroot"), 47 "--node_path", 48 rebase_path("//third_party/node"), 49 ] 50 if (use_clang_coverage) { 51 args += [ 52 "--target_clang_coverage", 53 "$use_clang_coverage", 54 ] 55 } 56} 57