Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2344)

Unified Diff: allocator/BUILD.gn

Issue 2043183002: Update to Chromium //base at Chromium commit 01cb97b2e09618bbc3a60c7348f0a844eea20547. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | android/java/src/org/chromium/base/library_loader/LegacyLinker.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: allocator/BUILD.gn
diff --git a/allocator/BUILD.gn b/allocator/BUILD.gn
index 8944ad4397438276c42fd87b069c3e99ba549925..5a1e9df190ff7eca9e5640c787e3c65b9f4757f9 100644
--- a/allocator/BUILD.gn
+++ b/allocator/BUILD.gn
@@ -4,6 +4,13 @@
import("//build/config/allocator.gni")
+declare_args() {
+ # Provide a way to force disable debugallocation in Debug builds,
+ # e.g. for profiling (it's more rare to profile Debug builds,
+ # but people sometimes need to do that).
+ enable_debugallocation = is_debug
+}
+
# Only executables and not libraries should depend on the allocator target;
# only the application (the final executable) knows what allocator makes sense.
# This "allocator" meta-target will forward to the default allocator according
@@ -32,6 +39,16 @@ config("allocator_shim_define") {
}
}
+config("tcmalloc_flags") {
+ if (enable_debugallocation) {
+ defines = [
+ # Use debugallocation for Debug builds to catch problems early
+ # and cleanly, http://crbug.com/30715 .
+ "TCMALLOC_FOR_DEBUGALLOCATION",
+ ]
+ }
+}
+
# This config and libc modification are only used on Windows.
if (is_win) {
import("//build/config/win/visual_studio_version.gni")
@@ -195,7 +212,10 @@ if (use_allocator == "tcmalloc") {
]
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":tcmalloc_flags",
+ ]
deps = []
« no previous file with comments | « DEPS ('k') | android/java/src/org/chromium/base/library_loader/LegacyLinker.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698