Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: third_party/libc++/BUILD.gn

Issue 2978723002: Only enable shared libc++ for ASan, MSan and TSan builds. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698