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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 configs += [ | 60 configs += [ |
61 ":config", | 61 ":config", |
62 "//build/config/compiler:no_chromium_code", | 62 "//build/config/compiler:no_chromium_code", |
63 "//build/config/compiler:rtti", | 63 "//build/config/compiler:rtti", |
64 "//build/config/gcc:symbol_visibility_default", | 64 "//build/config/gcc:symbol_visibility_default", |
65 "//build/config/sanitizers:sanitizer_options_link_helper", | 65 "//build/config/sanitizers:sanitizer_options_link_helper", |
66 ] | 66 ] |
67 | 67 |
68 ldflags = [ "-nodefaultlibs" ] | 68 ldflags = [ "-nodefaultlibs" ] |
69 | 69 |
70 # TODO(GYP): Remove "-pthread" from ldflags. | 70 # Remove "-pthread" from ldflags. |
71 # -nodefaultlibs turns -pthread into a no-op, causing an unused argument | 71 # -nodefaultlibs turns -pthread into a no-op, causing an unused argument |
72 # warning. Explicitly link with -lpthread instead. | 72 # warning. Explicitly link with -lpthread instead. |
| 73 configs -= [ "//build/config/compiler:pthread" ] |
73 | 74 |
74 libs = [ | 75 libs = [ |
75 "m", | 76 "m", |
76 ] | 77 ] |
77 | 78 |
78 if (!is_mac) { | 79 if (!is_mac) { |
79 libs += [ | 80 libs += [ |
80 "c", | 81 "c", |
81 "gcc_s", | 82 "gcc_s", |
82 "pthread", | 83 "pthread", |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 # Normally the generator takes care of RPATH. Our case is special because | 123 # Normally the generator takes care of RPATH. Our case is special because |
123 # the generator is unaware of the libc++.so dependency. Note that setting | 124 # the generator is unaware of the libc++.so dependency. Note that setting |
124 # RPATH here is a potential security issue. See the following for another | 125 # RPATH here is a potential security issue. See the following for another |
125 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31
5 | 126 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31
5 |
126 "-Wl,-rpath,\$ORIGIN/", | 127 "-Wl,-rpath,\$ORIGIN/", |
127 ] | 128 ] |
128 } | 129 } |
129 | 130 |
130 lib_dirs = [ root_build_dir ] | 131 lib_dirs = [ root_build_dir ] |
131 } | 132 } |
OLD | NEW |