blob: 897f0d38eca4d97587a6222b016a07a601b7479c [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" ]
deps = [
"//base",
"//chromeos:chromeos_export",
"//chromeos/dbus",
"//chromeos/dbus/constants",
"//chromeos/dbus/resourced:resourced",
"//components/memory_pressure",
"//crypto",
"//services/resource_coordinator/public/cpp/memory_instrumentation",
]
sources = [
"aligned_memory.h",
"kstaled.cc",
"kstaled.h",
"memory.cc",
"memory.h",
"pagemap.cc",
"pagemap.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
deps = [
":memory",
"//base/test:test_support",
"//build:chromeos_buildflags",
"//components/memory_pressure",
"//mojo/core/embedder",
"//services/resource_coordinator/public/cpp/memory_instrumentation",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"memory_unittest.cc",
"pagemap_unittest.cc",
"pressure/system_memory_pressure_evaluator_unittest.cc",
]
}