Chromium Code Reviews| 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 shared_library("libc++") { | |
| 6 # libc++abi is linked statically into libc++.so. This allows us to get both | |
| 7 # libc++ and libc++abi by passing '-stdlib=libc++'. If libc++abi was a | |
| 8 # separate DSO, we'd have to link against it explicitly. | |
| 9 deps = [ | |
| 10 "//buildtools/third_party/libc++abi", | |
| 11 ] | |
| 12 | |
| 13 sources = [ | |
| 14 "trunk/src/algorithm.cpp", | |
| 15 "trunk/src/bind.cpp", | |
| 16 "trunk/src/chrono.cpp", | |
| 17 "trunk/src/condition_variable.cpp", | |
| 18 "trunk/src/debug.cpp", | |
| 19 "trunk/src/exception.cpp", | |
| 20 "trunk/src/future.cpp", | |
| 21 "trunk/src/hash.cpp", | |
| 22 "trunk/src/ios.cpp", | |
| 23 "trunk/src/iostream.cpp", | |
| 24 "trunk/src/locale.cpp", | |
| 25 "trunk/src/memory.cpp", | |
| 26 "trunk/src/mutex.cpp", | |
| 27 "trunk/src/new.cpp", | |
| 28 "trunk/src/optional.cpp", | |
| 29 "trunk/src/random.cpp", | |
| 30 "trunk/src/regex.cpp", | |
| 31 "trunk/src/shared_mutex.cpp", | |
| 32 "trunk/src/stdexcept.cpp", | |
| 33 "trunk/src/string.cpp", | |
| 34 "trunk/src/strstream.cpp", | |
| 35 "trunk/src/system_error.cpp", | |
| 36 "trunk/src/thread.cpp", | |
| 37 "trunk/src/typeinfo.cpp", | |
| 38 "trunk/src/utility.cpp", | |
| 39 "trunk/src/valarray.cpp", | |
| 40 ] | |
| 41 include_dirs = [ | |
| 42 "trunk/include", | |
| 43 "../libc++abi/trunk/include", | |
| 44 ] | |
| 45 cflags = [ | |
| 46 "-fstrict-aliasing", | |
|
earthdok
2015/05/25 15:48:19
Why are some flags passed explicitly while others
Sam McNally
2015/05/26 00:55:49
The others were controlled by existing configs. Ad
| |
| 47 "-nostdinc++", | |
| 48 "-std=c++11", | |
| 49 ] | |
| 50 configs -= [ | |
| 51 "//build/config/gcc:no_exceptions", | |
|
earthdok
2015/05/25 15:48:19
Will those work with clang?
Sam McNally
2015/05/26 00:55:49
Yes.
| |
| 52 "//build/config/compiler:no_rtti", | |
| 53 "//build/config/gcc:symbol_visibility_hidden", | |
| 54 "//build/config/compiler:chromium_code", | |
| 55 ] | |
| 56 configs += [ | |
| 57 "//build/config/compiler:rtti", | |
| 58 "//build/config/compiler:no_chromium_code", | |
| 59 "//build/config/sanitizers:sanitizer_options_link_helper", | |
| 60 ] | |
| 61 ldflags = [ "-nodefaultlibs" ] | |
| 62 | |
| 63 # TODO(GYP): Remove "-pthread" from ldflags. It somehow causes a warning from | |
| 64 # clang about an unused compilation option. | |
| 65 # TODO(earthdok): find out what's causing the warning. | |
| 66 libs = [ | |
| 67 "c", | |
| 68 "gcc_s", | |
| 69 "pthread", | |
| 70 "rt", | |
| 71 ] | |
| 72 } | |
| 73 | |
| 74 group("libcxx_proxy") { | |
| 75 deps = [ | |
| 76 ":libc++", | |
| 77 ] | |
| 78 public_configs = [ ":link_helper" ] | |
| 79 } | |
| 80 | |
| 81 config("link_helper") { | |
| 82 ldflags = [ | |
| 83 "-stdlib=libc++", | |
| 84 | |
| 85 # Normally the generator takes care of RPATH. Our case is special because | |
| 86 # the generator is unaware of the libc++.so dependency. Note that setting | |
| 87 # RPATH here is a potential security issue. | |
| 88 # See: https://code.google.com/p/gyp/issues/detail?id=315 | |
| 89 "-Wl,-R,\$ORIGIN/", | |
|
Alexander Potapenko
2015/05/25 08:30:09
Does the above comment apply to GN?
earthdok
2015/05/25 15:48:19
The security issue here is that a setuid executabl
Sam McNally
2015/05/26 00:55:49
Done.
| |
| 90 ] | |
| 91 lib_dirs = [ root_build_dir ] | |
| 92 } | |
| OLD | NEW |