Always compile rtc_base/trace_categories.{h,cc}.
Instead use the preprocessor to avoid compiling Perfetto related code when RTC_USE_PERFETTO is not defined. Bug: None Change-Id: I85b37cb0287327035ac2e8feb3caf9505486a1e4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368343 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Evan Shrubsole <eshr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43410}
This commit is contained in:
parent
ab0b1888a5
commit
79c380c5b7
@ -187,6 +187,8 @@ rtc_library("event_tracer") {
|
||||
sources = [
|
||||
"event_tracer.cc",
|
||||
"event_tracer.h",
|
||||
"trace_categories.cc",
|
||||
"trace_categories.h",
|
||||
"trace_event.h",
|
||||
]
|
||||
deps = [
|
||||
@ -203,12 +205,6 @@ rtc_library("event_tracer") {
|
||||
"system:rtc_export",
|
||||
"//third_party/abseil-cpp/absl/strings:string_view",
|
||||
]
|
||||
if (rtc_use_perfetto) {
|
||||
sources += [
|
||||
"trace_categories.cc",
|
||||
"trace_categories.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_library("histogram_percentile_counter") {
|
||||
|
||||
@ -10,4 +10,8 @@
|
||||
|
||||
#include "rtc_base/trace_categories.h"
|
||||
|
||||
#if defined(RTC_USE_PERFETTO)
|
||||
|
||||
PERFETTO_TRACK_EVENT_STATIC_STORAGE_IN_NAMESPACE_WITH_ATTRS(webrtc, RTC_EXPORT);
|
||||
|
||||
#endif // RTC_USE_PERFETTO
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
#ifndef RTC_BASE_TRACE_CATEGORIES_H_
|
||||
#define RTC_BASE_TRACE_CATEGORIES_H_
|
||||
|
||||
#if defined(RTC_USE_PERFETTO)
|
||||
|
||||
#define PERFETTO_ENABLE_LEGACY_TRACE_EVENTS 1
|
||||
|
||||
#include "rtc_base/system/rtc_export.h"
|
||||
@ -30,4 +32,6 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
|
||||
PERFETTO_USE_CATEGORIES_FROM_NAMESPACE(webrtc);
|
||||
|
||||
#endif // RTC_USE_PERFETTO
|
||||
|
||||
#endif // RTC_BASE_TRACE_CATEGORIES_H_
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user