chromium-src-build/config/allocator.gni

22 строки
699 B
Plaintext

# 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.
import("//build/config/sanitizers/sanitizers.gni")
if (is_android || current_cpu == "mipsel" || is_mac || is_ios || is_asan ||
is_lsan || is_tsan || is_msan || is_win || is_syzyasan) {
_default_allocator = "none"
} else {
_default_allocator = "tcmalloc"
}
declare_args() {
# Memory allocator to use. Set to "none" to use default allocator.
use_allocator = _default_allocator
}
assert(use_allocator == "none" || use_allocator == "tcmalloc")
assert(!is_win || use_allocator == "none", "Tcmalloc doesn't work on Windows.")