env.bzl 598 B

12345678910111213141516
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. """Provides support for macOS-specific malloc issues."""
  5. def macos_malloc_env():
  6. """Disable nano malloc when running asan.
  7. On macOS, there's a nano zone allocation warning due to asan (arises
  8. in fastbuild/dbg). This suppresses the warning in `bazel run`.
  9. """
  10. return select({
  11. "//bazel/macos_malloc:macos_asan": {"MallocNanoZone": "0"},
  12. "//conditions:default": {},
  13. })