Commit aea5524b authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

base/allocator: Respect use_allocator when selecting the shim

Since use_allocator="partition" means that PartitionAlloc should
be used as the default allocator, select the partition alloc shim
in case of use_allocator="partition".

This patch doesn't take effect immediately as no bots currently
specify use_allocator="partition" (PA-Everywhere is WIP).

When PA-Everywhere will land, it will be enabled on all eligible
platforms (Linux, Mac, Win, Android, CrOS, but not iOS), i.e.
PA-Everywhere will be enabled on Linux as target and host env,
Android as target env, and CrOS as target env, so there is no
need to support a twisted case like PA-E on Android (target) +
glibc on Linux (host).  This patch simplifies and fixes the build
settings.

Bug: 998048
Change-Id: I7ae736e58e9b77185f7ad046f8cc5df56d9c02ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362352
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805257}
parent d20b1c9b
...@@ -1321,14 +1321,8 @@ component("base") { ...@@ -1321,14 +1321,8 @@ component("base") {
sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
} else if ((is_linux || is_chromeos || is_android) && } else if ((is_linux || is_chromeos || is_android) &&
use_allocator == "partition") { use_allocator == "partition") {
# Cannot use the same dispatching for host-side binaries. sources +=
if (is_a_target_toolchain) { [ "allocator/allocator_shim_default_dispatch_to_partition_alloc.cc" ]
sources += [
"allocator/allocator_shim_default_dispatch_to_partition_alloc.cc",
]
} else {
sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
}
} else if (is_android) { } else if (is_android) {
sources += sources +=
[ "allocator/allocator_shim_override_linker_wrapped_symbols.h" ] [ "allocator/allocator_shim_override_linker_wrapped_symbols.h" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment