# Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. # 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("../../../base/config.gni") config("ebpf_converter_inner_config") { visibility = [ ":*" ] ldflags = [] cflags = [] defines = [ "_GNU_SOURCE" ] defines += [ "is_mingw=${is_mingw}" ] defines += [ "WIN32_LEAN_AND_MEAN" ] defines += [ "NOGDI" ] ldflags += [ "-Wl,--whole-archive", "-lpthread", "-Wl,--no-whole-archive", "--coverage", ] cflags += [ "-std=c++17" ] cflags += [ "-mllvm", "-limited-coverage-experimental=true", "-fno-use-cxa-atexit", "-Wno-inconsistent-dllimport", ] } ohos_executable("ebpf_converter") { public_configs = [] if (!is_mingw) { defines = [ "_GNU_SOURCE" ] } else { public_configs = [ ":ebpf_converter_inner_config" ] } sources = [ "src/ebpf_converter.cpp" ] include_dirs = [ "./include" ] external_deps = [ "bounds_checking_function:libsec_shared" ] install_enable = false subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" }