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

Unified Diff: base/allocator/BUILD.gn

Issue 2138173002: Hookup the generic heap intercept for Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix dangling use of ::g_win_new_mode. Created 4 years, 5 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 | « no previous file | base/allocator/allocator_impl_win.h » ('j') | base/allocator/allocator_impl_win.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/BUILD.gn
diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn
index d25239ae6f849ea320cb44f72ea7c734c7883cd6..7f57e6b2056671ed2ecf6a283b58a3417d5acf44 100644
--- a/base/allocator/BUILD.gn
+++ b/base/allocator/BUILD.gn
@@ -13,8 +13,10 @@ declare_args() {
enable_debugallocation = is_debug
}
-# Allocator shim is only enabled for Release static builds.
-win_use_allocator_shim = is_win && !is_component_build && !is_debug
+# The Windows-only allocator shim is only enabled for Release static builds, and
+# is mutually exclusive with the generalized shim.
+win_use_allocator_shim = is_win && !is_component_build && !is_debug &&
+ !use_experimental_allocator_shim
# This "allocator" meta-target will forward to the default allocator according
# to the build settings.
@@ -38,9 +40,7 @@ group("allocator") {
# assumes that the library using it will eventually be linked with
# //base/allocator in the default way. Clean this up and delete this.
config("allocator_shim_define") {
- if (win_use_allocator_shim) {
- defines = [ "ALLOCATOR_SHIM" ]
- }
+ defines = [ "ALLOCATOR_SHIM" ]
Primiano Tucci (use gerrit) 2016/07/12 14:51:04 If I am understanding this correctly you are dropp
Sigurður Ásgeirsson 2016/07/14 19:04:26 Done.
}
config("tcmalloc_flags") {
@@ -79,6 +79,8 @@ config("tcmalloc_flags") {
if (win_use_allocator_shim) {
source_set("allocator_shim") {
sources = [
+ "allocator_impl_win.cc",
Primiano Tucci (use gerrit) 2016/07/12 14:51:04 I think just for the sake of making all these file
Sigurður Ásgeirsson 2016/07/14 19:04:26 Done.
+ "allocator_impl_win.h",
"allocator_shim_win.cc",
"allocator_shim_win.h",
]
@@ -302,7 +304,18 @@ if (use_experimental_allocator_shim) {
"allocator_shim_override_cpp_symbols.h",
"allocator_shim_override_libc_symbols.h",
]
- if (is_linux && use_allocator == "tcmalloc") {
+ if (is_win) {
+ sources += [
+ "allocator_impl_win.cc",
+ "allocator_impl_win.h",
+ ]
+
+ # This gates tests that require the presence of the allocator shim.
+ configs += [ ":allocator_shim_define" ]
Primiano Tucci (use gerrit) 2016/07/12 14:51:04 if you follow my suggestion above about having the
Sigurður Ásgeirsson 2016/07/14 19:04:26 Done.
+ }
+ if (is_win) {
+ sources += [ "allocator_shim_default_dispatch_to_winheap.cc" ]
+ } else if (is_linux && use_allocator == "tcmalloc") {
sources += [
"allocator_shim_default_dispatch_to_tcmalloc.cc",
"allocator_shim_override_glibc_weak_symbols.h",
« no previous file with comments | « no previous file | base/allocator/allocator_impl_win.h » ('j') | base/allocator/allocator_impl_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698