Commit 0227f88b authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Commit Bot

Only enable shared libc++ for ASan, MSan, TSan and UBSan-vptr builds.

Re-land of https://codereview.chromium.org/2978723002 with a fix
for UBSan.

Bug: 701919
Change-Id: I75f798dab00c966d8a1ecdebc519a0251f914700
Reviewed-on: https://chromium-review.googlesource.com/572186Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486931}
parent 8c1ea7c7
...@@ -11,8 +11,13 @@ declare_args() { ...@@ -11,8 +11,13 @@ declare_args() {
use_custom_libcxx = (is_linux && !is_chromeos && use_custom_libcxx = (is_linux && !is_chromeos &&
(!is_chromecast || is_cast_desktop_build)) || is_msan (!is_chromecast || is_cast_desktop_build)) || is_msan
# Sanitizer builds need to override operator new, operator delete, and # ASan, MSan and TSan builds need to override operator new, operator delete,
# some exception handling symbols, so libc++ must be a shared library # and some exception handling symbols, so libc++ must be a shared library to
# to prevent duplicate symbol errors when linking. # prevent duplicate symbol errors when linking.
libcpp_is_static = !is_component_build && !using_sanitizer # Additionally, -fsanitize=vptr requires libc++ to be a shared library
# because the ubsan runtime library that implements -fsanitize=vptr calls
# dynamic_cast with the ABI type info classes, which won't return the right
# answer if each DSO has its own copy of the ABI classes.
libcpp_is_static = !is_component_build && !is_asan && !is_msan && !is_tsan &&
!is_ubsan && !is_ubsan_security && !is_ubsan_vptr
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment