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

Side by Side Diff: third_party/libc++/BUILD.gn

Issue 2570443003: [counting_allocator] macOS buildtools/ changes.
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" ]
11 cflags = [ 11 cflags = [
12 "-fPIC", 12 "-fPIC",
13 "-fstrict-aliasing", 13 "-fstrict-aliasing",
14 "-pthread", 14 "-pthread",
15 ] 15 ]
16 cflags_cc = [ 16 cflags_cc = [
17 "-nostdinc++", 17 "-nostdinc++",
18 "-isystem" + rebase_path("trunk/include", root_build_dir), 18 "-isystem" + rebase_path("trunk/include", root_build_dir),
19 "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir), 19 "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir),
20 "-std=c++11", 20 "-std=c++11",
21 ] 21 ]
22 } 22 }
23 23
24 shared_library("libc++") { 24 static_library("libc++_static") {
25 sources = [ 25 sources = [
26 "trunk/src/algorithm.cpp", 26 "trunk/src/algorithm.cpp",
27 "trunk/src/any.cpp", 27 "trunk/src/any.cpp",
28 "trunk/src/bind.cpp", 28 "trunk/src/bind.cpp",
29 "trunk/src/chrono.cpp", 29 "trunk/src/chrono.cpp",
30 "trunk/src/condition_variable.cpp", 30 "trunk/src/condition_variable.cpp",
31 "trunk/src/debug.cpp", 31 "trunk/src/debug.cpp",
32 "trunk/src/exception.cpp", 32 "trunk/src/exception.cpp",
33 "trunk/src/future.cpp", 33 "trunk/src/future.cpp",
34 "trunk/src/hash.cpp", 34 "trunk/src/hash.cpp",
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 # -nodefaultlibs on mac doesn't add any kind of runtime libraries. 96 # -nodefaultlibs on mac doesn't add any kind of runtime libraries.
97 # These runtimes have to be added manually. 97 # These runtimes have to be added manually.
98 lib_dirs = [ "//third_party/llvm-build/Release+Asserts/lib/clang/$clang_vers ion/lib/darwin" ] 98 lib_dirs = [ "//third_party/llvm-build/Release+Asserts/lib/clang/$clang_vers ion/lib/darwin" ]
99 99
100 if (is_asan) { 100 if (is_asan) {
101 libs += [ "clang_rt.asan_osx_dynamic" ] 101 libs += [ "clang_rt.asan_osx_dynamic" ]
102 } 102 }
103 } 103 }
104 } 104 }
105 105
106 shared_library("libc++") {
107 deps = [ ":libc++_static" ]
108 }
109
106 group("libcxx_proxy") { 110 group("libcxx_proxy") {
107 deps = [ 111 deps = [
108 ":libc++", 112 ":libc++",
109 ] 113 ]
110 public_configs = [ ":link_helper" ] 114 public_configs = [ ":link_helper" ]
111 } 115 }
112 116
113 # This config is only used by binaries and shared library targets. 117 # This config is only used by binaries and shared library targets.
114 # //build/config/sanitizers:default_sanitizer_flags sets the include paths for 118 # //build/config/sanitizers:default_sanitizer_flags sets the include paths for
115 # everything else. 119 # everything else.
116 config("link_helper") { 120 config("link_helper") {
117 ldflags = [ 121 ldflags = [
118 "-stdlib=libc++", 122 "-stdlib=libc++",
119 ] 123 ]
120 124
121 if (!is_mac) { 125 if (!is_mac) {
122 ldflags += [ 126 ldflags += [
123 # Normally the generator takes care of RPATH. Our case is special because 127 # Normally the generator takes care of RPATH. Our case is special because
124 # the generator is unaware of the libc++.so dependency. Note that setting 128 # the generator is unaware of the libc++.so dependency. Note that setting
125 # RPATH here is a potential security issue. See the following for another 129 # RPATH here is a potential security issue. See the following for another
126 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31 5 130 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31 5
127 "-Wl,-rpath,\$ORIGIN/", 131 "-Wl,-rpath,\$ORIGIN/",
128 ] 132 ]
129 } 133 }
130 134
131 lib_dirs = [ root_build_dir ] 135 lib_dirs = [ root_build_dir ]
132 } 136 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698