# 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") import("//developtools/profiler/build/config.gni") import("../copts/configure_copts.gni") config("cflags_config") { cflags = [ "-Wall", "-Wextra", "-Weverything", "-Wno-c++98-compat-pedantic", "-Wno-conversion", "-Wno-covered-switch-default", "-Wno-deprecated", "-Wno-disabled-macro-expansion", "-Wno-double-promotion", "-Wno-comma", "-Wno-extra-semi", "-Wno-extra-semi-stmt", "-Wno-packed", "-Wno-padded", "-Wno-sign-compare", "-Wno-float-conversion", "-Wno-float-equal", "-Wno-format-nonliteral", "-Wno-gcc-compat", "-Wno-global-constructors", "-Wno-exit-time-destructors", "-Wno-non-modular-include-in-module", "-Wno-old-style-cast", "-Wno-range-loop-analysis", "-Wno-reserved-id-macro", "-Wno-shorten-64-to-32", "-Wno-switch-enum", "-Wno-thread-safety-negative", "-Wno-unknown-warning-option", "-Wno-unreachable-code", "-Wno-unused-macros", "-Wno-weak-vtables", "-Wno-zero-as-null-pointer-constant", "-Wbitfield-enum-conversion", "-Wbool-conversion", "-Wconstant-conversion", "-Wenum-conversion", "-Wint-conversion", "-Wliteral-conversion", "-Wnon-literal-null-conversion", "-Wnull-conversion", "-Wobjc-literal-conversion", "-Wno-sign-conversion", "-Wstring-conversion", "-DNOMINMAX", ] # Adapating DEBUG version, FIX ME # https://gitee.com/openharmony/build/pulls/1206/files defines = [ "NDEBUG" ] } ohos_shared_library("absl_strings") { sources = [ "ascii.cc", "charconv.cc", "escaping.cc", "internal/charconv_bigint.cc", "internal/charconv_bigint.h", "internal/charconv_parse.cc", "internal/charconv_parse.h", "internal/memutil.cc", "internal/memutil.h", "internal/stl_type_traits.h", "internal/str_join_internal.h", "internal/str_split_internal.h", "match.cc", "numbers.cc", "str_cat.cc", "str_replace.cc", "str_split.cc", "string_view.cc", "substitute.cc", ] include_dirs = [ "${ABSEIL_DIR}/" ] configs = [ ":cflags_config" ] public_deps = [ ":absl_strings_internal", "${ABSEIL_DIR}/absl/base:absl_raw_logging_internal", ] install_enable = true subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" } ohos_shared_library("absl_strings_internal") { sources = [ "internal/escaping.cc", "internal/ostringstream.cc", "internal/utf8.cc", ] include_dirs = [ "${ABSEIL_DIR}/" ] configs = [ ":cflags_config" ] deps = [ "${ABSEIL_DIR}/absl/base:absl_raw_logging_internal" ] install_enable = true subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" } ohos_shared_library("absl_cord") { sources = [ "cord.cc" ] include_dirs = [ "${ABSEIL_DIR}/" ] configs = [ ":cflags_config" ] deps = [ ":absl_strings", "${ABSEIL_DIR}/absl/base:absl_raw_logging_internal", ] install_enable = true subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" } ohos_shared_library("absl_str_format_internal") { sources = [ "internal/str_format/arg.cc", "internal/str_format/bind.cc", "internal/str_format/extension.cc", "internal/str_format/float_conversion.cc", "internal/str_format/output.cc", "internal/str_format/parser.cc", ] include_dirs = [ "${ABSEIL_DIR}/" ] configs = [ ":cflags_config" ] deps = [ ":absl_strings", "${ABSEIL_DIR}/absl/numeric:absl_int128", ] install_enable = true subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" }