blob: c6ca4da227fb6b77331fac0c0e5db7206b6100ad [file] [log] [blame]
# Copyright 2021 The Dawn & Tint Authors
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("../../../scripts/dawn_overrides_with_defaults.gni")
import("${dawn_root}/scripts/dawn_features.gni")
config("absl_config") {
if (dawn_standalone && is_clang) {
cflags = [
# Allow the use of enable_if()
"-Wno-gcc-compat",
]
}
include_dirs = [ "${dawn_abseil_dir}" ]
}
template("absl_source_set") {
source_set(target_name) {
forward_variables_from(invoker, "*")
if (!defined(public_configs)) {
public_configs = []
}
public_configs += [ ":absl_config" ]
}
}
#
# absl/base
#
absl_source_set("log_severity") {
sources = [ "${dawn_abseil_dir}/absl/base/log_severity.cc" ]
public = [ "${dawn_abseil_dir}/absl/base/log_severity.h" ]
}
absl_source_set("raw_logging_internal") {
sources = [ "${dawn_abseil_dir}/absl/base/internal/raw_logging.cc" ]
public = [ "${dawn_abseil_dir}/absl/base/internal/raw_logging.h" ]
public_deps = [ ":log_severity" ]
visibility = [ ":*" ]
}
absl_source_set("throw_delegate") {
sources = [ "${dawn_abseil_dir}/absl/base/internal/throw_delegate.cc" ]
public = [ "${dawn_abseil_dir}/absl/base/internal/throw_delegate.h" ]
public_deps = [ ":raw_logging_internal" ]
visibility = [ ":*" ]
}
#
# absl/numeric
#
absl_source_set("int128") {
sources = [
"${dawn_abseil_dir}/absl/numeric/int128.cc",
"${dawn_abseil_dir}/absl/numeric/int128_have_intrinsic.inc",
"${dawn_abseil_dir}/absl/numeric/int128_no_intrinsic.inc",
]
public = [ "${dawn_abseil_dir}/absl/numeric/int128.h" ]
}
#
# absl/strings
#
absl_source_set("strings") {
sources = [
"${dawn_abseil_dir}/absl/strings/ascii.cc",
"${dawn_abseil_dir}/absl/strings/charconv.cc",
"${dawn_abseil_dir}/absl/strings/escaping.cc",
"${dawn_abseil_dir}/absl/strings/internal/charconv_bigint.cc",
"${dawn_abseil_dir}/absl/strings/internal/charconv_bigint.h",
"${dawn_abseil_dir}/absl/strings/internal/charconv_parse.cc",
"${dawn_abseil_dir}/absl/strings/internal/charconv_parse.h",
"${dawn_abseil_dir}/absl/strings/internal/memutil.cc",
"${dawn_abseil_dir}/absl/strings/internal/memutil.h",
"${dawn_abseil_dir}/absl/strings/internal/stl_type_traits.h",
"${dawn_abseil_dir}/absl/strings/internal/str_join_internal.h",
"${dawn_abseil_dir}/absl/strings/internal/str_split_internal.h",
"${dawn_abseil_dir}/absl/strings/match.cc",
"${dawn_abseil_dir}/absl/strings/numbers.cc",
"${dawn_abseil_dir}/absl/strings/str_cat.cc",
"${dawn_abseil_dir}/absl/strings/str_replace.cc",
"${dawn_abseil_dir}/absl/strings/str_split.cc",
"${dawn_abseil_dir}/absl/strings/string_view.cc",
"${dawn_abseil_dir}/absl/strings/substitute.cc",
]
public = [
"${dawn_abseil_dir}/absl/strings/ascii.h",
"${dawn_abseil_dir}/absl/strings/charconv.h",
"${dawn_abseil_dir}/absl/strings/escaping.h",
"${dawn_abseil_dir}/absl/strings/internal/string_constant.h",
"${dawn_abseil_dir}/absl/strings/match.h",
"${dawn_abseil_dir}/absl/strings/numbers.h",
"${dawn_abseil_dir}/absl/strings/str_cat.h",
"${dawn_abseil_dir}/absl/strings/str_join.h",
"${dawn_abseil_dir}/absl/strings/str_replace.h",
"${dawn_abseil_dir}/absl/strings/str_split.h",
"${dawn_abseil_dir}/absl/strings/string_view.h",
"${dawn_abseil_dir}/absl/strings/strip.h",
"${dawn_abseil_dir}/absl/strings/substitute.h",
]
deps = [
":int128",
":raw_logging_internal",
":strings_internal",
":throw_delegate",
]
}
absl_source_set("strings_internal") {
sources = [
"${dawn_abseil_dir}/absl/strings/internal/escaping.cc",
"${dawn_abseil_dir}/absl/strings/internal/ostringstream.cc",
"${dawn_abseil_dir}/absl/strings/internal/utf8.cc",
]
public = [
"${dawn_abseil_dir}/absl/strings/internal/char_map.h",
"${dawn_abseil_dir}/absl/strings/internal/escaping.h",
"${dawn_abseil_dir}/absl/strings/internal/ostringstream.h",
"${dawn_abseil_dir}/absl/strings/internal/resize_uninitialized.h",
"${dawn_abseil_dir}/absl/strings/internal/utf8.h",
]
deps = [ ":raw_logging_internal" ]
}
absl_source_set("str_format") {
public = [ "${dawn_abseil_dir}/absl/strings/str_format.h" ]
deps = [ ":str_format_internal" ]
}
absl_source_set("str_format_internal") {
sources = [
"${dawn_abseil_dir}/absl/strings/internal/str_format/arg.cc",
"${dawn_abseil_dir}/absl/strings/internal/str_format/bind.cc",
"${dawn_abseil_dir}/absl/strings/internal/str_format/extension.cc",
"${dawn_abseil_dir}/absl/strings/internal/str_format/float_conversion.cc",
"${dawn_abseil_dir}/absl/strings/internal/str_format/output.cc",
"${dawn_abseil_dir}/absl/strings/internal/str_format/parser.cc",
]
public = [
"${dawn_abseil_dir}/absl/strings/internal/str_format/arg.h",
"${dawn_abseil_dir}/absl/strings/internal/str_format/bind.h",
"${dawn_abseil_dir}/absl/strings/internal/str_format/checker.h",
"${dawn_abseil_dir}/absl/strings/internal/str_format/extension.h",
"${dawn_abseil_dir}/absl/strings/internal/str_format/float_conversion.h",
"${dawn_abseil_dir}/absl/strings/internal/str_format/output.h",
"${dawn_abseil_dir}/absl/strings/internal/str_format/parser.h",
]
visibility = [ ":*" ]
deps = [
":int128",
":strings",
]
}