1# Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. 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/ohos.gni") 15 16import("../../../build/ts.gni") 17ohos_source_set("js_memory_tables") { 18 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 19 part_name = "${OHOS_PROFILER_PART_NAME}" 20 sources = [ 21 "js_config_table.cpp", 22 "js_cpu_profiler_node_table.cpp", 23 "js_cpu_profiler_sample_table.cpp", 24 "js_heap_edges_table.cpp", 25 "js_heap_files_table.cpp", 26 "js_heap_info_table.cpp", 27 "js_heap_location_table.cpp", 28 "js_heap_nodes_table.cpp", 29 "js_heap_sample_table.cpp", 30 "js_heap_string_table.cpp", 31 "js_heap_trace_function_info_table.cpp", 32 "js_heap_trace_node_table.cpp", 33 ] 34 include_dirs = [ "include" ] 35 public_configs = [ "${SRC}/table/base:base_tables_cfg" ] 36 if (!is_independent_compile) { 37 configs = [ "${TS_DIR}/gn:ts_config" ] 38 } 39 if (enable_ts_utest && !use_wasm) { 40 cflags = [ 41 "-fprofile-arcs", 42 "-ftest-coverage", 43 ] 44 ldflags = [ 45 "-fprofile-arcs", 46 "-ftest-coverage", 47 "--coverage", 48 ] 49 if (is_test) { 50 cflags += [ "-D IS_UT" ] 51 } 52 } 53} 54