OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 { | |
6 'variables': { | |
7 'libcxx_root': '../../buildtools/third_party/libc++', | |
8 }, | |
9 'targets': [ | |
10 { | |
11 'target_name': 'libcxx_proxy', | |
12 'type': 'none', | |
13 'toolsets': ['host', 'target'], | |
14 'dependencies=': [ | |
15 'libc++', | |
16 ], | |
17 # Do not add dependency on libc++.so to dependents of this target. We | |
18 # don't want to pass libc++.so on the command line to the linker, as that | |
19 # would cause it to be linked into C executables which don't need it. | |
20 # Instead, we supply -stdlib=libc++ and let the clang driver decide. | |
21 'dependencies_traverse': 0, | |
22 'variables': { | |
23 # Don't add this target to the dependencies of targets with type=none. | |
24 'link_dependency': 1, | |
25 }, | |
26 'all_dependent_settings': { | |
27 'target_conditions': [ | |
28 ['_type!="none"', { | |
29 'cflags_cc': [ | |
30 '-nostdinc++', | |
31 '-isystem<(libcxx_root)/trunk/include', | |
32 '-isystem<(libcxx_root)/../libc++abi/trunk/include', | |
33 ], | |
34 'ldflags': [ | |
35 '-stdlib=libc++', | |
36 # Normally the generator takes care of RPATH. Our case is special | |
37 # because the generator is unaware of the libc++.so dependency. | |
38 # Note that setting RPATH here is a potential security issue. See: | |
39 # https://code.google.com/p/gyp/issues/detail?id=315 | |
40 '-Wl,-rpath,\$$ORIGIN/lib/', | |
41 ], | |
42 'library_dirs': [ | |
43 '<(PRODUCT_DIR)/lib/', | |
44 ], | |
45 }], | |
46 ], | |
47 }, | |
48 }, | |
49 { | |
50 'target_name': 'libc++', | |
51 'type': 'shared_library', | |
52 'toolsets': ['host', 'target'], | |
53 'dependencies=': [ | |
54 # libc++abi is linked statically into libc++.so. This allows us to get | |
55 # both libc++ and libc++abi by passing '-stdlib=libc++'. If libc++abi | |
56 # was a separate DSO, we'd have to link against it explicitly. | |
57 '../libc++abi/libc++abi.gyp:libc++abi', | |
58 ], | |
59 'sources': [ | |
60 'trunk/src/algorithm.cpp', | |
61 'trunk/src/any.cpp', | |
62 'trunk/src/bind.cpp', | |
63 'trunk/src/chrono.cpp', | |
64 'trunk/src/condition_variable.cpp', | |
65 'trunk/src/debug.cpp', | |
66 'trunk/src/exception.cpp', | |
67 'trunk/src/future.cpp', | |
68 'trunk/src/hash.cpp', | |
69 'trunk/src/ios.cpp', | |
70 'trunk/src/iostream.cpp', | |
71 'trunk/src/locale.cpp', | |
72 'trunk/src/memory.cpp', | |
73 'trunk/src/mutex.cpp', | |
74 'trunk/src/new.cpp', | |
75 'trunk/src/optional.cpp', | |
76 'trunk/src/random.cpp', | |
77 'trunk/src/regex.cpp', | |
78 'trunk/src/shared_mutex.cpp', | |
79 'trunk/src/stdexcept.cpp', | |
80 'trunk/src/string.cpp', | |
81 'trunk/src/strstream.cpp', | |
82 'trunk/src/system_error.cpp', | |
83 'trunk/src/thread.cpp', | |
84 'trunk/src/typeinfo.cpp', | |
85 'trunk/src/utility.cpp', | |
86 'trunk/src/valarray.cpp', | |
87 ], | |
88 'cflags': [ | |
89 '-fPIC', | |
90 '-fstrict-aliasing', | |
91 '-pthread', | |
92 ], | |
93 'cflags_cc': [ | |
94 '-nostdinc++', | |
95 '-isystem<(libcxx_root)/trunk/include', | |
96 '-isystem<(libcxx_root)/../libc++abi/trunk/include', | |
97 '-std=c++11', | |
98 ], | |
99 'cflags_cc!': [ | |
100 '-fno-exceptions', | |
101 '-fno-rtti', | |
102 ], | |
103 'cflags!': [ | |
104 '-fvisibility=hidden', | |
105 ], | |
106 'defines': [ | |
107 'LIBCXX_BUILDING_LIBCXXABI', | |
108 ], | |
109 'ldflags': [ | |
110 '-nodefaultlibs', | |
111 ], | |
112 'ldflags!': [ | |
113 # -nodefaultlibs turns -pthread into a no-op, causing an unused argument | |
114 # warning. Explicitly link with -lpthread instead. | |
115 '-pthread', | |
116 ], | |
117 'libraries': [ | |
118 '-lc', | |
119 '-lgcc_s', | |
120 '-lm', | |
121 '-lpthread', | |
122 '-lrt', | |
123 ], | |
124 }, | |
125 ] | |
126 } | |
OLD | NEW |