blob: ece96974fa68ee1591dee7c28313aeb5b512f246 [file] [log] [blame]
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//testing/test.gni")
assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
# Used by targets that compile into the implementation.
config("chromeos_implementation") {
defines = [ "CHROMEOS_IMPLEMENTATION" ]
}
component("memory") {
defines = [ "IS_CHROMEOS_MEMORY_IMPL" ]
configs += [
":chromeos_implementation",
"//build/config/linux/nss:system_nss_no_ssl_config",
]
public_deps = [ "//chromeos/constants" ]
deps = [
"//base",
"//base/util/memory_pressure",
"//chromeos:chromeos_export",
"//chromeos/dbus",
"//chromeos/dbus/constants",
"//services/resource_coordinator/public/cpp/memory_instrumentation",
]
sources = [
"kstaled.cc",
"kstaled.h",
"memory.cc",
"memory.h",
"pagemap.cc",
"pagemap.h",
"pressure/pressure.cc",
"pressure/pressure.h",
"pressure/system_memory_pressure_evaluator.cc",
"pressure/system_memory_pressure_evaluator.h",
"swap_configuration.cc",
"swap_configuration.h",
]
}
source_set("unit_tests") {
testonly = true
configs += [ "//build/config/linux/nss:system_nss_no_ssl_config" ]
deps = [
":memory",
"//base/test:test_support",
"//base/util/memory_pressure",
"//build:chromeos_buildflags",
"//mojo/core/embedder",
"//services/resource_coordinator/public/cpp/memory_instrumentation",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"pagemap_unittest.cc",
"pressure/pressure_unittest.cc",
"pressure/system_memory_pressure_evaluator_unittest.cc",
]
}