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

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

Issue 2938913003: Force hidden symbol visibility for allocation operators (Closed)
Patch Set: Remove stdlib_new_delete from libc++abi Created 3 years, 6 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 | third_party/libc++/alloc_visibility_overrides.S » ('j') | 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 # Sanitizer builds 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.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 "trunk/src/stdexcept.cpp", 91 "trunk/src/stdexcept.cpp",
92 "trunk/src/string.cpp", 92 "trunk/src/string.cpp",
93 "trunk/src/strstream.cpp", 93 "trunk/src/strstream.cpp",
94 "trunk/src/system_error.cpp", 94 "trunk/src/system_error.cpp",
95 "trunk/src/thread.cpp", 95 "trunk/src/thread.cpp",
96 "trunk/src/typeinfo.cpp", 96 "trunk/src/typeinfo.cpp",
97 "trunk/src/utility.cpp", 97 "trunk/src/utility.cpp",
98 "trunk/src/valarray.cpp", 98 "trunk/src/valarray.cpp",
99 "trunk/src/variant.cpp", 99 "trunk/src/variant.cpp",
100 ] 100 ]
101 if (libcpp_is_static) {
102 # Current gcc and clang do not allow declaring several allocation
103 # operators with hidden visibility [1] [2], however we don't want
104 # these symbols exported on static builds. This is a workaround
105 # that takes advantage of an ELF visibility merging rule that
106 # picks the "most hidden" visibility of all versions of a symbol,
107 # even if the symbol is undefined.
108 #
109 # [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81107
110 # [2] https://bugs.llvm.org/show_bug.cgi?id=33473
111 sources += [ "alloc_visibility_overrides.S" ]
112 }
101 configs -= [ 113 configs -= [
102 "//build/config/compiler:chromium_code", 114 "//build/config/compiler:chromium_code",
103 "//build/config/compiler:no_rtti", 115 "//build/config/compiler:no_rtti",
104 "//build/config/gcc:no_exceptions", 116 "//build/config/gcc:no_exceptions",
105 ] 117 ]
106 configs += [ 118 configs += [
107 ":config", 119 ":config",
108 ":no_libstdcpp", 120 ":no_libstdcpp",
109 "//build/config/compiler:no_chromium_code", 121 "//build/config/compiler:no_chromium_code",
110 "//build/config/compiler:rtti", 122 "//build/config/compiler:rtti",
(...skipping 24 matching lines...) Expand all
135 # Normally the generator takes care of RPATH. Our case is special because 147 # Normally the generator takes care of RPATH. Our case is special because
136 # the generator is unaware of the libc++.so dependency. Note that setting 148 # the generator is unaware of the libc++.so dependency. Note that setting
137 # RPATH here is a potential security issue. See the following for another 149 # RPATH here is a potential security issue. See the following for another
138 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31 5 150 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31 5
139 "-Wl,-rpath,\$ORIGIN/", 151 "-Wl,-rpath,\$ORIGIN/",
140 ] 152 ]
141 } 153 }
142 154
143 lib_dirs = [ root_build_dir ] 155 lib_dirs = [ root_build_dir ]
144 } 156 }
OLDNEW
« no previous file with comments | « no previous file | third_party/libc++/alloc_visibility_overrides.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698