# Copyright (c) 2022 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") import("//commonlibrary/ets_utils/ets_utils_config.gni") import("//foundation/arkui/ace_engine/ace_config.gni") process_sources = [ "js_childprocess.cpp", "js_process.cpp", "native_module_process.cpp", ] if (target_os == "ios" || (!is_arkui_x && host_os == "mac")) { process_sources += [ "$platform_root/ios/process_helper.cpp" ] } else { process_sources += [ "$platform_root/default/process_helper.cpp" ] } ohos_shared_library("process") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } deps = [ ":process_static" ] external_deps = [ "hilog:libhilog" ] subsystem_name = "commonlibrary" part_name = "ets_utils" relative_install_dir = "module" } ohos_source_set("process_static") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } include_dirs = [ "$process_root", platform_root, ets_util_path, ] sources = process_sources deps = [] if (is_arkui_x) { include_dirs += [ "//third_party/icu/icu4c/source/common", "//third_party/node/src", "$napi_root/interfaces/kits", "$plugins_root/hilog/include", "$plugins_root/interfaces", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", ] if (target_os == "android") { defines = [ "ANDROID_PLATFORM" ] } if (target_os == "ios") { defines = [ "IOS_PLATFORM" ] } deps += [ "$plugins_root/libs/icu:icu_${target_os}", "$plugins_root/libs/napi:napi_${target_os}", "$plugins_root/libs/securec:sec_${target_os}", ] } else { external_deps = [ "napi:ace_napi" ] if (is_standard_system) { external_deps += [ "hilog:libhilog" ] } else { external_deps += [ "c_utils:utils", "hilog:libhilog", ] } deps += [ "//third_party/icu/icu4c:shared_icuuc" ] external_deps += [ "bounds_checking_function:libsec_shared" ] } subsystem_name = "commonlibrary" part_name = "ets_utils" } group("process_packages") { deps = [ ":process" ] }