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("//arkcompiler/ets_runtime/js_runtime_config.gni") 15 16src_libmplutil = [ 17 "src/mpl_logging.cpp", 18 "src/namemangler.cpp", 19 "src/mpl_int_val.cpp", 20] 21 22src_libcommandline = [ 23 "src/cl_option.cpp", 24 "src/cl_option_parser.cpp", 25 "src/cl_parser.cpp", 26] 27 28include_libmplutil = [ 29 "${MAPLEALL_ROOT}/maple_util/include", 30 "${MAPLEALL_ROOT}/maple_ir/include", 31 "${MAPLEALL_ROOT}/mempool/include", 32 "${MAPLEALL_ROOT}/maple_driver/include", 33] 34 35include_libcommandline = [ "${MAPLEALL_ROOT}/maple_util/include" ] 36 37ohos_static_library("libmplutil") { 38 stack_protector_ret = false 39 if (enable_sanitize) { 40 sanitize = { 41 cfi = true 42 cfi_cross_dso = true 43 debug = false 44 } 45 branch_protector_ret = "pac_ret" 46 } 47 configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ] 48 sources = src_libmplutil 49 include_dirs = include_libmplutil 50 external_deps = [ "bounds_checking_function:libsec_static" ] 51 libs = [ "pthread" ] 52 output_dir = "${root_out_dir}/lib/${HOST_ARCH}" 53 part_name = "ets_runtime" 54 subsystem_name = "arkcompiler" 55} 56 57ohos_static_library("libcommandline") { 58 stack_protector_ret = false 59 configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ] 60 sources = src_libcommandline 61 include_dirs = include_libcommandline 62 external_deps = [ "bounds_checking_function:libsec_static" ] 63 output_dir = "${root_out_dir}/lib/${HOST_ARCH}" 64 part_name = "ets_runtime" 65 subsystem_name = "arkcompiler" 66} 67