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

Side by Side Diff: third_party/libc++/libc++.gyp

Issue 264613005: Change the way libc++ is linked when use_custom_libcxx=1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nuke commented lines Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | third_party/libc++abi/libc++abi.gyp » ('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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 { 5 {
6 'targets': [ 6 'targets': [
7 { 7 {
8 'target_name': 'libc++', 8 'target_name': 'libcxx_proxy',
9 'type': 'shared_library', 9 'type': 'none',
10 'dependencies=': [
11 'libc++',
12 ],
13 # Do not add dependency on libc++.so to dependents of this target. We
14 # don't want to pass libc++.so on the command line to the linker, as that
15 # would cause it to be linked into C executables which don't need it.
16 # Instead, we supply -stdlib=libc++ and let the clang driver decide.
17 'dependencies_traverse': 0,
10 'variables': { 18 'variables': {
11 'prune_self_dependency': 1,
12 # Don't add this target to the dependencies of targets with type=none. 19 # Don't add this target to the dependencies of targets with type=none.
13 'link_dependency': 1, 20 'link_dependency': 1,
14 }, 21 },
22 'direct_dependent_settings': {
23 'target_conditions': [
24 ['_type!="none"', {
25 'include_dirs': [
26 'trunk/include',
27 '../libc++abi/trunk/include',
28 ],
29 'cflags_cc': [
30 '-nostdinc++',
31 ],
32 'ldflags': [
33 '-stdlib=libc++',
34 # Normally the generator takes care of RPATH. Our case is special
35 # because the generator is unaware of the libc++.so dependency.
36 # Note that setting RPATH here is a potential security issue. See:
37 # https://code.google.com/p/gyp/issues/detail?id=315
38 '-Wl,-R,\$$ORIGIN/lib/',
39 ],
40 'library_dirs': [
41 '<(PRODUCT_DIR)/lib/',
42 ],
43 }],
44 ],
45 },
46 },
47 {
48 'target_name': 'libc++',
49 'type': 'shared_library',
15 'dependencies=': [ 50 'dependencies=': [
51 # Libc++abi is linked statically into libc++.so. This allows us to get
Alexander Potapenko 2014/04/30 18:18:38 s/L/l
52 # both libc++ and libc++abi by passing '-stdlib=libc++'. If libc++abi
53 # was a separate DSO, we'd have to link against it explicitly.
16 '../libc++abi/libc++abi.gyp:libc++abi', 54 '../libc++abi/libc++abi.gyp:libc++abi',
17 ], 55 ],
18 'sources': [ 56 'sources': [
19 'trunk/src/algorithm.cpp', 57 'trunk/src/algorithm.cpp',
20 'trunk/src/bind.cpp', 58 'trunk/src/bind.cpp',
21 'trunk/src/chrono.cpp', 59 'trunk/src/chrono.cpp',
22 'trunk/src/condition_variable.cpp', 60 'trunk/src/condition_variable.cpp',
23 'trunk/src/debug.cpp', 61 'trunk/src/debug.cpp',
24 'trunk/src/exception.cpp', 62 'trunk/src/exception.cpp',
25 'trunk/src/future.cpp', 63 'trunk/src/future.cpp',
(...skipping 29 matching lines...) Expand all
55 '-Wextra', 93 '-Wextra',
56 '-Wshadow', 94 '-Wshadow',
57 '-Wconversion', 95 '-Wconversion',
58 '-Wnewline-eof', 96 '-Wnewline-eof',
59 '-Wpadded', 97 '-Wpadded',
60 '-Wmissing-prototypes', 98 '-Wmissing-prototypes',
61 '-Wstrict-aliasing=2', 99 '-Wstrict-aliasing=2',
62 '-Wstrict-overflow=4', 100 '-Wstrict-overflow=4',
63 '-nostdinc++', 101 '-nostdinc++',
64 ], 102 ],
65 'direct_dependent_settings': {
66 'target_conditions': [
67 ['_type!="none"', {
68 'include_dirs': [
69 'trunk/include',
70 ],
71 'cflags_cc': [
72 '-nostdinc++',
73 ],
74 'ldflags': [
75 '-stdlib=libc++',
76 '-L<(PRODUCT_DIR)/lib/',
77 ],
78 }],
79 ],
80 },
81 'cflags_cc!': [ 103 'cflags_cc!': [
82 '-fno-rtti', 104 '-fno-rtti',
83 ], 105 ],
84 'cflags!': [ 106 'cflags!': [
85 '-fno-exceptions', 107 '-fno-exceptions',
86 '-fvisibility=hidden', 108 '-fvisibility=hidden',
87 ], 109 ],
88 'ldflags': [ 110 'ldflags': [
89 '-nodefaultlibs', 111 '-nodefaultlibs',
90 '<(PRODUCT_DIR)/lib/libc++abi.so',
91 ], 112 ],
92 'ldflags!': [ 113 'ldflags!': [
93 # This somehow causes a warning from clang about an unused compilation 114 # This somehow causes a warning from clang about an unused compilation
94 # option. Use '-lpthread' instead. 115 # option. Use '-lpthread' instead.
95 # TODO(earthdok): find out what's causing the warning. 116 # TODO(earthdok): find out what's causing the warning.
96 '-pthread', 117 '-pthread',
97 ], 118 ],
98 'libraries': [ 119 'libraries': [
99 '-lc', 120 '-lc',
100 '-lgcc_s', 121 '-lgcc_s',
101 '-lpthread', 122 '-lpthread',
102 '-lrt', 123 '-lrt',
103 ], 124 ],
104 }, 125 },
105 ] 126 ]
106 } 127 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | third_party/libc++abi/libc++abi.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698