| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
| 6 import("//build/toolchain/toolchain.gni") | 6 import("//build/toolchain/toolchain.gni") |
| 7 | 7 |
| 8 # Sanitizer builds need to override operator new, operator delete, and | 8 # ASan, MSan and TSan need to override operator new, operator delete, and |
| 9 # some exception handling symbols, so libc++ must be a shared library | 9 # some exception handling symbols, so libc++ must be a shared library |
| 10 # to prevent duplicate symbol errors when linking. | 10 # to prevent duplicate symbol errors when linking. |
| 11 libcpp_is_static = !is_component_build && !using_sanitizer | 11 libcpp_is_static = !is_component_build && !is_asan && !is_msan && !is_tsan |
| 12 | 12 |
| 13 # Used by libc++ and libc++abi. | 13 # Used by libc++ and libc++abi. |
| 14 config("config") { | 14 config("config") { |
| 15 defines = [ "LIBCXX_BUILDING_LIBCXXABI" ] | 15 defines = [ "LIBCXX_BUILDING_LIBCXXABI" ] |
| 16 if (libcpp_is_static) { | 16 if (libcpp_is_static) { |
| 17 # Don't leak any symbols on a static build. | 17 # Don't leak any symbols on a static build. |
| 18 defines += [ | 18 defines += [ |
| 19 "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", | 19 "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", |
| 20 "_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", | 20 "_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", |
| 21 | 21 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 "//buildtools/third_party/libc++abi", | 138 "//buildtools/third_party/libc++abi", |
| 139 ] | 139 ] |
| 140 } | 140 } |
| 141 | 141 |
| 142 group("libcxx_proxy") { | 142 group("libcxx_proxy") { |
| 143 deps = [ | 143 deps = [ |
| 144 ":libc++", | 144 ":libc++", |
| 145 ] | 145 ] |
| 146 public_configs = [ ":no_libstdcpp" ] | 146 public_configs = [ ":no_libstdcpp" ] |
| 147 } | 147 } |
| OLD | NEW |