blob: 8bfee3da6af5b1c80a0eb592bc38412d4f3f655a [file] [log] [blame]
# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//third_party/abseil-cpp/absl.gni")
absl_source_set("graphcycles_internal") {
sources = [ "internal/graphcycles.cc" ]
public = [ "internal/graphcycles.h" ]
deps = [
"//third_party/abseil-cpp/absl/base",
"//third_party/abseil-cpp/absl/base:base_internal",
"//third_party/abseil-cpp/absl/base:config",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/base:malloc_internal",
"//third_party/abseil-cpp/absl/base:raw_logging_internal",
]
visibility = [ "//third_party/abseil-cpp/absl/*" ]
}
absl_source_set("kernel_timeout_internal") {
sources = [ "internal/kernel_timeout.cc" ]
public = [ "internal/kernel_timeout.h" ]
deps = [
"//third_party/abseil-cpp/absl/base",
"//third_party/abseil-cpp/absl/base:config",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/base:raw_logging_internal",
"//third_party/abseil-cpp/absl/time",
]
visibility = [ ":*" ]
}
absl_test("kernel_timeout_internal_test") {
sources = [ "internal/kernel_timeout_test.cc" ]
deps = [
":kernel_timeout_internal",
"//third_party/abseil-cpp/absl/base:config",
"//third_party/abseil-cpp/absl/random",
"//third_party/abseil-cpp/absl/time",
]
}
absl_source_set("synchronization") {
if (use_cobalt_customizations) {
# Minimal support for absl::Mutex needed for logging and Cord.
sources = [ "mutex_starboard.cc" ]
public = [ "mutex.h" ]
deps = [
":kernel_timeout_internal",
"//starboard:starboard_headers_only",
"//third_party/abseil-cpp/absl/base",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/base:malloc_internal",
"//third_party/abseil-cpp/absl/time",
]
} else {
sources = [
"barrier.cc",
"blocking_counter.cc",
"internal/create_thread_identity.cc",
"internal/futex_waiter.cc",
"internal/per_thread_sem.cc",
"internal/pthread_waiter.cc",
"internal/sem_waiter.cc",
"internal/stdcpp_waiter.cc",
"internal/waiter_base.cc",
"internal/win32_waiter.cc",
"mutex.cc",
"notification.cc",
]
public = [
"barrier.h",
"blocking_counter.h",
"internal/create_thread_identity.h",
"internal/futex.h",
"internal/futex_waiter.h",
"internal/per_thread_sem.h",
"internal/pthread_waiter.h",
"internal/sem_waiter.h",
"internal/stdcpp_waiter.h",
"internal/waiter.h",
"internal/waiter_base.h",
"internal/win32_waiter.h",
"mutex.h",
"notification.h",
]
deps = [
":graphcycles_internal",
":kernel_timeout_internal",
"//third_party/abseil-cpp/absl/base",
"//third_party/abseil-cpp/absl/base:atomic_hook",
"//third_party/abseil-cpp/absl/base:base_internal",
"//third_party/abseil-cpp/absl/base:config",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/base:dynamic_annotations",
"//third_party/abseil-cpp/absl/base:malloc_internal",
"//third_party/abseil-cpp/absl/base:raw_logging_internal",
"//third_party/abseil-cpp/absl/debugging:stacktrace",
"//third_party/abseil-cpp/absl/debugging:symbolize",
"//third_party/abseil-cpp/absl/time",
]
}
}
absl_test("waiter_test") {
# Synchronization is not Starboardized since at this time it's banned for use
# in Chromium code.
if (!use_cobalt_customizations) {
sources = [ "internal/waiter_test.cc" ]
deps = [
":kernel_timeout_internal",
":synchronization",
":thread_pool",
"//third_party/abseil-cpp/absl/base:config",
"//third_party/abseil-cpp/absl/random",
"//third_party/abseil-cpp/absl/time",
]
} else {
deps = []
}
}
absl_source_set("thread_pool") {
testonly = true
public = [ "internal/thread_pool.h" ]
deps = [
":synchronization",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/functional:any_invocable",
]
visibility = [ "//third_party/abseil-cpp/absl/*" ]
}
absl_source_set("per_thread_sem_test_common") {
testonly = true
sources = [ "internal/per_thread_sem_test.cc" ]
deps = [
":synchronization",
"//third_party/abseil-cpp/absl/base",
"//third_party/abseil-cpp/absl/base:config",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/time",
"//third_party/googletest:gtest",
]
}
# absl_test("mutex_method_pointer_test") {
# sources = [ "mutex_method_pointer_test.cc" ]
# deps = [
# ":synchronization",
# "//third_party/abseil-cpp/absl/base:config",
# ]
# }