Reland "Enable _LIBCPP_DEBUG in Clang for non-Xcode-based debug builds."

This is a reland of 9eb89bac85

Original change's description:
> Enable _LIBCPP_DEBUG in Clang for non-Xcode-based debug builds.
>
> Unlike _GLIBCXX_DEBUG, this is meant to not break the ABI.
> The libc++ bundled with Xcode does not contain debug symbols so we need
> to disable these checks on Mac/iOS.
>
> Change-Id: Ie4f18e247db9c405b2ce45f388c41dcac8104815
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297874
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

Change-Id: I3583ae9d9b8e2e0ea88ff5be6b5b784e7e10c7e2
Bug: skia:10410
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359117
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
John Stiles 2020-06-19 20:04:43 -04:00 committed by Skia Commit-Bot
parent efa461f6c1
commit 233de6d8cd

View File

@ -60,6 +60,14 @@ config("default") {
}
}
if (is_debug) {
if (is_ios || is_mac) {
# The libc++ that ships with Xcode does not contain _LIBCPP_DEBUG symbols.
} else {
defines += [ "_LIBCPP_DEBUG=1" ] # Asserts and iterator debugging.
}
}
# Disable warnings about unknown attributes.
# (These unknown attribute warnings are on by default, so we don't make
# disabling them part of :warnings, as some targets remove :warnings.)