diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 19:33:08 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 19:33:08 +0000 |
commit | 2354994eae6a4099f5cc03cf18513b29d219e9e2 (patch) | |
tree | bfbd0b4d447dce447b487f157742f9f7dee2011b /build/config | |
parent | afb30e39c6791afed6cd12f085649400e4d80ae8 (diff) | |
download | chromium_src-2354994eae6a4099f5cc03cf18513b29d219e9e2.zip chromium_src-2354994eae6a4099f5cc03cf18513b29d219e9e2.tar.gz chromium_src-2354994eae6a4099f5cc03cf18513b29d219e9e2.tar.bz2 |
Hook up base unit tests and allocator to GN build.
Adds a meta-target "//base/allocator" that forwards to tcmallor or nothing depending on the build configuration.
Write tcmalloc target definition.
Write base unit tests prefs, and some support targets from base.gypi.
Fix a bunch of added files in the base target that were exposed by linking the unit tests.
Removes toolkit_uses_gtk which was removed from the GYP build.
BUG=
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/288203003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/config')
-rw-r--r-- | build/config/BUILD.gn | 4 | ||||
-rw-r--r-- | build/config/allocator.gni | 14 | ||||
-rw-r--r-- | build/config/ui.gni | 3 |
3 files changed, 18 insertions, 3 deletions
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index d83a221..48a33ed 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/allocator.gni") import("//build/config/crypto.gni") import("//build/config/features.gni") import("//build/config/ui.gni") @@ -120,6 +121,9 @@ config("feature_flags") { defines += [ "USE_XI2_MT=$use_xi2_mt" ] } } + if (use_allocator != "tcmalloc") { + defines += [ "NO_TCMALLOC" ] + } } # Debug/release ---------------------------------------------------------------- diff --git a/build/config/allocator.gni b/build/config/allocator.gni new file mode 100644 index 0000000..ef10c3d --- /dev/null +++ b/build/config/allocator.gni @@ -0,0 +1,14 @@ +# Copyright 2014 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. + +if (is_android || cpu_arch == "mipsel") { + _default_allocator = "none" +} else { + _default_allocator = "tcmalloc" +} + +declare_args() { + # Memory allocator to use. Set to "none" to use default allocator. + use_allocator = _default_allocator +} diff --git a/build/config/ui.gni b/build/config/ui.gni index 6577331..360e860 100644 --- a/build/config/ui.gni +++ b/build/config/ui.gni @@ -44,9 +44,6 @@ if (is_linux) { use_pango = false } -# Indicates if the UI toolkit depends on GTK. -toolkit_uses_gtk = is_linux && !is_chromeos && !use_aura && !use_ozone - # Use GPU accelerated cross process image transport by default on linux builds # with the Aura window manager. ui_compositor_image_transport = use_aura && is_linux |