Skip to content

Commit

Permalink
Merge pull request #155 from google/cpp-sync
Browse files Browse the repository at this point in the history
Internal change
  • Loading branch information
kyessenov authored Jun 7, 2022
2 parents 1adb613 + 7edd227 commit 1e0fd3d
Show file tree
Hide file tree
Showing 229 changed files with 28,717 additions and 5,424 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build --cxxopt=-std=c++17
build --cxxopt=-fsized-deallocation

# Enable matchers in googletest
build --define absl=1
Expand Down
277 changes: 277 additions & 0 deletions base/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
# Copyright 2021 Google LLC
#
# 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
#
# https://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.

package(
# Under active development, not yet being released.
default_visibility = ["//visibility:public"],
)

licenses(["notice"])

cc_library(
name = "handle",
hdrs = ["handle.h"],
deps = [
"//base/internal:handle",
"//internal:casts",
"@com_google_absl//absl/base:core_headers",
],
)

cc_library(
name = "kind",
srcs = ["kind.cc"],
hdrs = ["kind.h"],
deps = [
"@com_google_absl//absl/strings",
],
)

cc_test(
name = "kind_test",
srcs = ["kind_test.cc"],
deps = [
":kind",
"//internal:testing",
],
)

cc_library(
name = "memory_manager",
srcs = ["memory_manager.cc"],
hdrs = ["memory_manager.h"],
deps = [
"//base/internal:memory_manager",
"//internal:no_destructor",
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:config",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/base:dynamic_annotations",
"@com_google_absl//absl/numeric:bits",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/types:optional",
],
)

cc_test(
name = "memory_manager_test",
srcs = ["memory_manager_test.cc"],
deps = [
":memory_manager",
"//internal:testing",
],
)

cc_library(
name = "operators",
srcs = ["operators.cc"],
hdrs = ["operators.h"],
deps = [
"//base/internal:operators",
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
],
)

cc_test(
name = "operators_test",
srcs = ["operators_test.cc"],
deps = [
":operators",
"//internal:testing",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/status",
],
)

cc_library(
name = "type",
srcs = [
"type.cc",
"type_factory.cc",
"type_manager.cc",
"type_provider.cc",
],
hdrs = [
"type.h",
"type_factory.h",
"type_manager.h",
"type_provider.h",
"type_registry.h",
],
deps = [
":handle",
":kind",
":memory_manager",
"//base/internal:type",
"//internal:casts",
"//internal:no_destructor",
"//internal:rtti",
"//internal:status_macros",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/types:span",
"@com_google_absl//absl/types:variant",
],
)

cc_test(
name = "type_test",
srcs = [
"type_factory_test.cc",
"type_test.cc",
],
deps = [
":handle",
":memory_manager",
":type",
":value",
"//base/internal:memory_manager_testing",
"//internal:testing",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/status",
],
)

cc_library(
name = "value",
srcs = [
"value.cc",
"value_factory.cc",
],
hdrs = [
"value.h",
"value_factory.h",
],
deps = [
":handle",
":kind",
":memory_manager",
":type",
"//base/internal:value",
"//internal:casts",
"//internal:no_destructor",
"//internal:rtti",
"//internal:status_macros",
"//internal:strings",
"//internal:time",
"//internal:utf8",
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:inlined_vector",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:cord",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:optional",
"@com_google_absl//absl/types:variant",
],
)

cc_test(
name = "value_test",
srcs = [
"value_factory_test.cc",
"value_test.cc",
],
deps = [
":memory_manager",
":type",
":value",
"//base/internal:memory_manager_testing",
"//internal:strings",
"//internal:testing",
"//internal:time",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/hash:hash_testing",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
],
)

cc_library(
name = "ast",
hdrs = [
"ast.h",
],
deps = [
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:variant",
],
)

cc_test(
name = "ast_test",
srcs = [
"ast_test.cc",
],
deps = [
":ast",
"//internal:testing",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/types:variant",
],
)

cc_library(
name = "ast_utility",
srcs = ["ast_utility.cc"],
hdrs = ["ast_utility.h"],
deps = [
":ast",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/time",
"@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto",
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto",
"@com_google_protobuf//:protobuf",
],
)

cc_test(
name = "ast_utility_test",
srcs = [
"ast_utility_test.cc",
],
deps = [
":ast",
":ast_utility",
"//internal:testing",
"@com_google_absl//absl/status",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:variant",
"@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto",
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto",
"@com_google_protobuf//:protobuf",
],
)
Loading

0 comments on commit 1e0fd3d

Please sign in to comment.