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 # Used by libc++ and libc++abi. | 8 # Used by libc++ and libc++abi. |
9 config("config") { | 9 config("config") { |
10 defines = [ "LIBCXX_BUILDING_LIBCXXABI" ] | 10 defines = [ "LIBCXX_BUILDING_LIBCXXABI" ] |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 shared_library("libc++") { | 24 shared_library("libc++") { |
25 sources = [ | 25 sources = [ |
26 "trunk/src/algorithm.cpp", | 26 "trunk/src/algorithm.cpp", |
27 "trunk/src/any.cpp", | 27 "trunk/src/any.cpp", |
28 "trunk/src/bind.cpp", | 28 "trunk/src/bind.cpp", |
29 "trunk/src/chrono.cpp", | 29 "trunk/src/chrono.cpp", |
30 "trunk/src/condition_variable.cpp", | 30 "trunk/src/condition_variable.cpp", |
31 "trunk/src/debug.cpp", | 31 "trunk/src/debug.cpp", |
32 "trunk/src/exception.cpp", | 32 "trunk/src/exception.cpp", |
| 33 "trunk/src/functional.cpp", |
33 "trunk/src/future.cpp", | 34 "trunk/src/future.cpp", |
34 "trunk/src/hash.cpp", | 35 "trunk/src/hash.cpp", |
35 "trunk/src/ios.cpp", | 36 "trunk/src/ios.cpp", |
36 "trunk/src/iostream.cpp", | 37 "trunk/src/iostream.cpp", |
37 "trunk/src/locale.cpp", | 38 "trunk/src/locale.cpp", |
38 "trunk/src/memory.cpp", | 39 "trunk/src/memory.cpp", |
39 "trunk/src/mutex.cpp", | 40 "trunk/src/mutex.cpp", |
40 "trunk/src/new.cpp", | 41 "trunk/src/new.cpp", |
41 "trunk/src/optional.cpp", | 42 "trunk/src/optional.cpp", |
42 "trunk/src/random.cpp", | 43 "trunk/src/random.cpp", |
43 "trunk/src/regex.cpp", | 44 "trunk/src/regex.cpp", |
44 "trunk/src/shared_mutex.cpp", | 45 "trunk/src/shared_mutex.cpp", |
45 "trunk/src/stdexcept.cpp", | 46 "trunk/src/stdexcept.cpp", |
46 "trunk/src/string.cpp", | 47 "trunk/src/string.cpp", |
47 "trunk/src/strstream.cpp", | 48 "trunk/src/strstream.cpp", |
48 "trunk/src/system_error.cpp", | 49 "trunk/src/system_error.cpp", |
49 "trunk/src/thread.cpp", | 50 "trunk/src/thread.cpp", |
50 "trunk/src/typeinfo.cpp", | 51 "trunk/src/typeinfo.cpp", |
51 "trunk/src/utility.cpp", | 52 "trunk/src/utility.cpp", |
52 "trunk/src/valarray.cpp", | 53 "trunk/src/valarray.cpp", |
| 54 "trunk/src/variant.cpp", |
53 ] | 55 ] |
54 configs -= [ | 56 configs -= [ |
55 "//build/config/compiler:chromium_code", | 57 "//build/config/compiler:chromium_code", |
56 "//build/config/compiler:no_rtti", | 58 "//build/config/compiler:no_rtti", |
57 "//build/config/gcc:no_exceptions", | 59 "//build/config/gcc:no_exceptions", |
58 "//build/config/gcc:symbol_visibility_hidden", | 60 "//build/config/gcc:symbol_visibility_hidden", |
59 ] | 61 ] |
60 configs += [ | 62 configs += [ |
61 ":config", | 63 ":config", |
62 "//build/config/compiler:no_chromium_code", | 64 "//build/config/compiler:no_chromium_code", |
63 "//build/config/compiler:rtti", | 65 "//build/config/compiler:rtti", |
64 "//build/config/gcc:symbol_visibility_default", | 66 "//build/config/gcc:symbol_visibility_default", |
65 "//build/config/sanitizers:sanitizer_options_link_helper", | 67 "//build/config/sanitizers:sanitizer_options_link_helper", |
66 ] | 68 ] |
| 69 defines = [ "_LIBCPP_BUILDING_LIBRARY" ] |
67 | 70 |
68 ldflags = [ "-nodefaultlibs" ] | 71 ldflags = [ "-nodefaultlibs" ] |
69 | 72 |
70 # Remove "-pthread" from ldflags. | 73 # Remove "-pthread" from ldflags. |
71 # -nodefaultlibs turns -pthread into a no-op, causing an unused argument | 74 # -nodefaultlibs turns -pthread into a no-op, causing an unused argument |
72 # warning. Explicitly link with -lpthread instead. | 75 # warning. Explicitly link with -lpthread instead. |
73 configs -= [ "//build/config/compiler:pthread" ] | 76 configs -= [ "//build/config/compiler:pthread" ] |
74 | 77 |
75 libs = [ | 78 libs = [ |
76 "m", | 79 "m", |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 # Normally the generator takes care of RPATH. Our case is special because | 126 # Normally the generator takes care of RPATH. Our case is special because |
124 # the generator is unaware of the libc++.so dependency. Note that setting | 127 # the generator is unaware of the libc++.so dependency. Note that setting |
125 # RPATH here is a potential security issue. See the following for another | 128 # RPATH here is a potential security issue. See the following for another |
126 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31
5 | 129 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31
5 |
127 "-Wl,-rpath,\$ORIGIN/", | 130 "-Wl,-rpath,\$ORIGIN/", |
128 ] | 131 ] |
129 } | 132 } |
130 | 133 |
131 lib_dirs = [ root_build_dir ] | 134 lib_dirs = [ root_build_dir ] |
132 } | 135 } |
OLD | NEW |