blob: 6b4017e894640f0434956b77605cbace6a40b098 [file] [log] [blame]
# Copyright 2021 The Dawn Authors
#
# 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("../../../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",
]
}