1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- # Copyright 2022 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/config/features.gni")
- if (is_win) {
- # This is in a separate config so the flags can be applied to dependents.
- # ldflags in GN aren't automatically inherited.
- config("compute_pressure_win_linker_flags") {
- libs = [ "pdh.lib" ]
- ldflags = [ "/DELAYLOAD:pdh.dll" ]
- }
- }
- source_set("compute_pressure") {
- visibility = [ "//services/device:*" ]
- sources = [
- "cpu_probe.cc",
- "cpu_probe.h",
- "platform_collector.cc",
- "platform_collector.h",
- "pressure_manager_impl.cc",
- "pressure_manager_impl.h",
- "pressure_sample.h",
- ]
- public_deps = [ "//services/device/public/mojom" ]
- deps = [
- "//base",
- "//mojo/public/cpp/bindings",
- ]
- if (is_linux || is_chromeos) {
- sources += [
- "core_times.cc",
- "core_times.h",
- "cpu_probe_linux.cc",
- "cpu_probe_linux.h",
- "procfs_stat_cpu_parser.cc",
- "procfs_stat_cpu_parser.h",
- ]
- }
- if (is_win) {
- sources += [
- "cpu_probe_win.cc",
- "cpu_probe_win.h",
- "scoped_pdh_query.cc",
- "scoped_pdh_query.h",
- ]
- all_dependent_configs = [ ":compute_pressure_win_linker_flags" ]
- }
- if (is_mac) {
- sources += [
- "core_times.cc",
- "core_times.h",
- "cpu_probe_mac.cc",
- "cpu_probe_mac.h",
- "host_processor_info_scanner.cc",
- "host_processor_info_scanner.h",
- ]
- }
- }
|