mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 00:40:31 +00:00
Note this will need to be set per-cc_binary, but I don't think there's a good way to avoid that. I didn't try hijacking the `cc_binary` rule name because that felt a bit excessive. We probably will have a few binaries we want to run directly, but I don't think it needs to be addressed on every last one. This is part of addressing #1404
17 lines
598 B
Python
17 lines
598 B
Python
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
"""Provides support for macOS-specific malloc issues."""
|
|
|
|
def macos_malloc_env():
|
|
"""Disable nano malloc when running asan.
|
|
|
|
On macOS, there's a nano zone allocation warning due to asan (arises
|
|
in fastbuild/dbg). This suppresses the warning in `bazel run`.
|
|
"""
|
|
return select({
|
|
"//bazel/macos_malloc:macos_asan": {"MallocNanoZone": "0"},
|
|
"//conditions:default": {},
|
|
})
|