Skip to content

Commit

Permalink
Move enable_base_tracing/use_perfetto_client_library to build_overrides.
Browse files Browse the repository at this point in the history
This will allow projects that use //base to override
these two GN args in an easier way (//build_overrides/build.gni
instead of gn args).

Bug: 1093406
Change-Id: I26d012732a428798a28e43726ce0abba54b3dd68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241123
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777444}
  • Loading branch information
Mirko Bonadei authored and Commit Bot committed Jun 11, 2020
1 parent 401ca34 commit b79aad6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# huge sequence of random-looking conditionals.

import("//base/allocator/allocator.gni")
import("//base/trace_event/features.gni")
import("//build/buildflag_header.gni")
import("//build/config/allocator.gni")
import("//build/config/arm.gni")
Expand All @@ -34,6 +33,7 @@ import("//build/config/sysroot.gni")
import("//build/config/ui.gni")
import("//build/nocompile.gni")
import("//build/timestamp.gni")
import("//build_overrides/build.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
Expand Down
2 changes: 1 addition & 1 deletion base/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//base/trace_event/features.gni")
import("//build/compiled_action.gni")
import("//build/config/nacl/config.gni")
import("//build/config/ui.gni")
import("//build_overrides/build.gni")

# Reset sources_assignment_filter for the BUILD.gn file to prevent
# regression during the migration of Chromium away from the feature.
Expand Down
19 changes: 0 additions & 19 deletions base/trace_event/features.gni

This file was deleted.

17 changes: 16 additions & 1 deletion build_overrides/build.gni
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//base/trace_event/features.gni")
import("//build/config/gclient_args.gni")

# Uncomment these to specify a different NDK location and version in
Expand All @@ -13,6 +12,22 @@ import("//build/config/gclient_args.gni")
# Some non-Chromium builds don't support building java targets.
enable_java_templates = true

# Features used by //base/trace_event and //services/tracing.
declare_args() {
# Tracing support requires //third_party/perfetto, which is not available in
# libchrome (CrOS's version of //base). This flag can disable tracing support
# altogether, in which case all tracing instrumentation in //base becomes a
# no-op.
# TODO(crbug/1065905): Add dependency on perfetto to support typed events.
enable_base_tracing = true

# Switches the TRACE_EVENT instrumentation from base's TraceLog implementation
# to //third_party/perfetto's client library. Not implemented yet, currently a
# no-op to set up trybot infrastructure.
# TODO(crbug/1006769): Switch to perfetto's client library.
use_perfetto_client_library = false
}

# Allows different projects to specify their own suppressions and blacklist
# files for sanitizer tools.
# asan_suppressions_file = "path/to/asan_suppressions.cc"
Expand Down
2 changes: 1 addition & 1 deletion services/tracing/public/cpp/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//base/trace_event/features.gni")
import("//build/buildflag_header.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/compiler/compiler.gni")
import("//build_overrides/build.gni")
import("//services/tracing/public/cpp/stack_sampling/loader_lock_sampling.gni")

buildflag_header("buildflags") {
Expand Down

0 comments on commit b79aad6

Please sign in to comment.