Skip to content

Commit

Permalink
base/allocator: Clean up base/BUILD.gn about use_allocator_shim
Browse files Browse the repository at this point in the history
allocator/allocator_shim_override_cpp_symbols.h and
allocator/allocator_shim_override_libc_symbols.h are not used on
all platforms.  The old BUILD.gn looked confusing as if these
two files are used regardless of platforms.

Moves the two files to platform-specific sections so that it's
clear that the files are platform-dependent.

Change-Id: I9da23cd7377d01b0a9c968224ddea88dd4c67211
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461186
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816162}
  • Loading branch information
yuki3 authored and Commit Bot committed Oct 12, 2020
1 parent 14b9195 commit 25924cc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1290,19 +1290,23 @@ component("base") {
"allocator/allocator_shim.cc",
"allocator/allocator_shim.h",
"allocator/allocator_shim_internals.h",
"allocator/allocator_shim_override_cpp_symbols.h",
"allocator/allocator_shim_override_libc_symbols.h",
]
if (is_android) {
sources +=
[ "allocator/allocator_shim_override_linker_wrapped_symbols.h" ]
sources += [
"allocator/allocator_shim_override_cpp_symbols.h",
"allocator/allocator_shim_override_linker_wrapped_symbols.h",
]
all_dependent_configs += [ "//base/allocator:wrap_malloc_symbols" ]
}
if (is_apple) {
sources += [ "allocator/allocator_shim_override_mac_symbols.h" ]
}
if (is_chromeos || is_linux) {
sources += [ "allocator/allocator_shim_override_glibc_weak_symbols.h" ]
sources += [
"allocator/allocator_shim_override_cpp_symbols.h",
"allocator/allocator_shim_override_glibc_weak_symbols.h",
"allocator/allocator_shim_override_libc_symbols.h",
]
}
if (is_win) {
sources += [
Expand Down

0 comments on commit 25924cc

Please sign in to comment.