blob: 05bcab3096aed23847e545b7f7f571c4cc45b3a8 [file] [log] [blame]
# Copyright 2022 The PDFium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/c++/c++.gni")
import("//build/config/sanitizers/sanitizers.gni")
# Sanitizers replace the allocator, don't use our own allocator.
_is_using_sanitizers = is_asan || is_hwasan || is_lsan || is_tsan || is_msan
# The allocator shim isn't working standalone on Windows at the moment.
# TODO(https://crbug.com/pdfium/2068) - make work with windows.
_use_shim = !_is_using_sanitizers && (!is_mac || use_custom_libcxx) && !is_win
# See base/allocator/partition_allocator/src/partition_alloc/external_builds.md
use_allocator_shim_default = _use_shim
use_partition_alloc_as_malloc_default = _use_shim
enable_backup_ref_ptr_support_default = _use_shim
enable_mte_checked_ptr_support_default = false
put_ref_count_in_previous_slot_default = false
enable_backup_ref_ptr_slow_checks_default = false
enable_dangling_raw_ptr_checks_default = false