Chromium Code Reviews| 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 # Used by libc++ and libc++abi. | |
| 5 config("config") { | 6 config("config") { |
| 7 defines = [ "LIBCXX_BUILDING_LIBCXXABI" ] | |
| 6 cflags = [ | 8 cflags = [ |
| 9 "-fPIC", | |
| 10 "-fstrict-aliasing", | |
| 11 "-pthread", | |
| 12 ] | |
| 13 cflags_cc = [ | |
| 14 "-nostdinc++", | |
| 7 "-isystem" + rebase_path("trunk/include", root_build_dir), | 15 "-isystem" + rebase_path("trunk/include", root_build_dir), |
| 8 "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir), | 16 "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir), |
| 9 "-fPIC", | |
| 10 "-fstrict-aliasing", | |
| 11 "-nostdinc++", | |
| 12 "-pthread", | |
| 13 "-std=c++11", | 17 "-std=c++11", |
| 14 "-DLIBCXX_BUILDING_LIBCXXABI", | |
| 15 ] | 18 ] |
| 16 } | 19 } |
| 17 | 20 |
| 18 shared_library("libc++") { | 21 shared_library("libc++") { |
| 19 sources = [ | 22 sources = [ |
| 20 "trunk/src/algorithm.cpp", | 23 "trunk/src/algorithm.cpp", |
| 21 "trunk/src/any.cpp", | 24 "trunk/src/any.cpp", |
| 22 "trunk/src/bind.cpp", | 25 "trunk/src/bind.cpp", |
| 23 "trunk/src/chrono.cpp", | 26 "trunk/src/chrono.cpp", |
| 24 "trunk/src/condition_variable.cpp", | 27 "trunk/src/condition_variable.cpp", |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 51 "//build/config/gcc:no_exceptions", | 54 "//build/config/gcc:no_exceptions", |
| 52 "//build/config/gcc:symbol_visibility_hidden", | 55 "//build/config/gcc:symbol_visibility_hidden", |
| 53 ] | 56 ] |
| 54 configs += [ | 57 configs += [ |
| 55 ":config", | 58 ":config", |
| 56 "//build/config/compiler:no_chromium_code", | 59 "//build/config/compiler:no_chromium_code", |
| 57 "//build/config/compiler:rtti", | 60 "//build/config/compiler:rtti", |
| 58 "//build/config/sanitizers:sanitizer_options_link_helper", | 61 "//build/config/sanitizers:sanitizer_options_link_helper", |
| 59 ] | 62 ] |
| 60 | 63 |
| 61 defines = [ "LIBCXX_BUILDING_LIBCXXABI" ] | |
| 62 ldflags = [ "-nodefaultlibs" ] | 64 ldflags = [ "-nodefaultlibs" ] |
| 63 | 65 |
| 64 # TODO(GYP): Remove "-pthread" from ldflags. | 66 # TODO(GYP): Remove "-pthread" from ldflags. |
| 65 # -nodefaultlibs turns -pthread into a no-op, causing an unused argument | 67 # -nodefaultlibs turns -pthread into a no-op, causing an unused argument |
| 66 # warning. Explicitly link with -lpthread instead. | 68 # warning. Explicitly link with -lpthread instead. |
| 67 | 69 |
| 68 libs = [ | 70 libs = [ |
| 69 "c", | 71 "c", |
| 70 "gcc_s", | 72 "gcc_s", |
| 71 "m", | 73 "m", |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 82 } | 84 } |
| 83 | 85 |
| 84 group("libcxx_proxy") { | 86 group("libcxx_proxy") { |
| 85 deps = [ | 87 deps = [ |
| 86 ":libc++", | 88 ":libc++", |
| 87 ] | 89 ] |
| 88 public_configs = [ ":link_helper" ] | 90 public_configs = [ ":link_helper" ] |
| 89 } | 91 } |
| 90 | 92 |
| 91 config("link_helper") { | 93 config("link_helper") { |
| 94 cflags_cc = [ | |
|
Sam McNally
2016/01/27 22:43:30
This config is only used by binaries and shared li
Nico
2016/01/27 22:54:00
Oh, thanks! https://code.google.com/p/chromium/cod
| |
| 95 "-nostdinc++", | |
| 96 "-isystem" + rebase_path("trunk/include", root_build_dir), | |
| 97 "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir), | |
| 98 ] | |
| 92 ldflags = [ | 99 ldflags = [ |
| 93 "-stdlib=libc++", | 100 "-stdlib=libc++", |
| 94 | 101 |
| 95 # Normally the generator takes care of RPATH. Our case is special because | 102 # Normally the generator takes care of RPATH. Our case is special because |
| 96 # the generator is unaware of the libc++.so dependency. Note that setting | 103 # the generator is unaware of the libc++.so dependency. Note that setting |
| 97 # RPATH here is a potential security issue. See the following for another | 104 # RPATH here is a potential security issue. See the following for another |
| 98 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=315 | 105 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=315 |
| 99 "-Wl,-R,\$ORIGIN/", | 106 "-Wl,-R,\$ORIGIN/", |
| 100 ] | 107 ] |
| 101 lib_dirs = [ root_build_dir ] | 108 lib_dirs = [ root_build_dir ] |
| 102 } | 109 } |
| OLD | NEW |