From f2a93452bb6e8f9f796db2c7868c7030ffedf74d Mon Sep 17 00:00:00 2001 From: handyohos Date: Sun, 26 Dec 2021 21:48:15 +0800 Subject: [PATCH] feat: Compile jsapi module only if support_jsapi is true. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 仅在support_jsapi为true时才编译jsapi模块 Signed-off-by: handyohos Change-Id: Ia1d08de27b7f337716ab9088c38733fa12f970a4 #I4O4N6 --- interfaces/kits/BUILD.gn | 20 ++++++++++++++++++++ ohos.build | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 interfaces/kits/BUILD.gn diff --git a/interfaces/kits/BUILD.gn b/interfaces/kits/BUILD.gn new file mode 100755 index 0000000..7141781 --- /dev/null +++ b/interfaces/kits/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright (C) 2021 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/ohos.gni") + +group("jsapi_kits_target") { + if (support_jsapi) { + deps = [ "js/napi:bytrace" ] + } +} diff --git a/ohos.build b/ohos.build index 2aa47f0..35c6551 100755 --- a/ohos.build +++ b/ohos.build @@ -6,7 +6,7 @@ "//developtools/bytrace_standard/interfaces/innerkits/native:bytrace_core", "//developtools/bytrace_standard/bin:bytrace_target", "//developtools/bytrace_standard/bin:bytrace.cfg", - "//developtools/bytrace_standard/interfaces/kits/js/napi:bytrace" + "//developtools/bytrace_standard/interfaces/kits:jsapi_kits_target" ], "inner_kits": [ {