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

Side by Side Diff: third_party/libcxx/BUILD.gn

Issue 1596483004: [fusl] Build libcxx atop fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « fusl/BUILD.gn ('k') | 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
(Empty)
1 # Copyright 2016 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 config("libcxx_config") {
6 cflags = [
7 # Flags from upstream CMake build
8 "-D_DEBUG",
9 "-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER",
10 "-D__STDC_CONSTANT_MACROS",
11 "-D__STDC_FORMAT_MACROS",
12 "-D__STDC_LIMIT_MACROS",
13 "-Dcxx_EXPORTS",
14 "-DLIBCXX_BUILDING_LIBCXXABI",
15
16 "-UNDEBUG",
17
18 "-fPIC",
19 "-fvisibility-inlines-hidden",
20
21 "-Wall",
22 "-Werror=return-type",
23
24 "-Wcast-qual",
25 "-Wcovered-switch-default",
26 "-Wdelete-non-virtual-dtor",
27 "-Wmissing-field-initializers",
28 "-Wno-error",
29 "-Wno-long-long",
30 "-Wno-long-long",
31 "-Wno-unused-parameter",
32 "-Wno-unused-parameter",
33 "-Wnon-virtual-dtor",
34 "-Wwrite-strings",
35
36 "-std=c++11",
37 "-nostdinc++",
38
39 # Use musl-based libc
40 "-D_LIBCPP_HAS_MUSL_LIBC",
viettrungluu 2016/01/15 23:41:50 Is this only used in the .cpp files? (Ditto for s
Petr Hosek 2016/01/16 02:55:02 The problem with this approach is that everyone wh
41 ]
42 }
43
44 static_library("libcxx") {
45 cflags = []
46
47 configs = []
48 configs += [ ":libcxx_config" ]
49
50 include_dirs = [
51 "libcxx/include",
52 "libcxxabi/include",
53 ]
54
55 cflags += [
viettrungluu 2016/01/15 23:41:50 Note: A simple "cflags = [ ... ]" here works and i
56 "--sysroot",
viettrungluu 2016/01/15 23:41:50 Is this really the right way to do this? Should w
57 "obj/fusl/sysroot",
58 ]
59
60 complete_static_lib = true
61
62 deps = [
63 "//fusl:sysroot",
64 ]
65
66 sources = [
67 "libcxx/src/algorithm.cpp",
68 "libcxx/src/any.cpp",
69 "libcxx/src/bind.cpp",
70 "libcxx/src/chrono.cpp",
71 "libcxx/src/condition_variable.cpp",
72 "libcxx/src/debug.cpp",
73 "libcxx/src/exception.cpp",
74 "libcxx/src/future.cpp",
75 "libcxx/src/hash.cpp",
76 "libcxx/src/ios.cpp",
77 "libcxx/src/iostream.cpp",
78 "libcxx/src/locale.cpp",
79 "libcxx/src/memory.cpp",
80 "libcxx/src/mutex.cpp",
81 "libcxx/src/new.cpp",
82 "libcxx/src/optional.cpp",
83 "libcxx/src/random.cpp",
84 "libcxx/src/regex.cpp",
85 "libcxx/src/shared_mutex.cpp",
86 "libcxx/src/stdexcept.cpp",
87 "libcxx/src/string.cpp",
88 "libcxx/src/strstream.cpp",
89 "libcxx/src/system_error.cpp",
90 "libcxx/src/thread.cpp",
91 "libcxx/src/typeinfo.cpp",
92 "libcxx/src/utility.cpp",
93 "libcxx/src/valarray.cpp",
94 ]
95 }
96
97 config("libcxxabi_config") {
viettrungluu 2016/01/15 23:41:50 I wonder if we should share more of this with libc
98 cflags = [
99 # Flags from upstream CMake build
100 "-D_DEBUG",
101 "-D__STDC_CONSTANT_MACROS",
102 "-D__STDC_FORMAT_MACROS",
103 "-D__STDC_LIMIT_MACROS",
104
105 "-fPIC",
106 "-fstrict-aliasing",
107 "-fvisibility-inlines-hidden",
108
109 "-Wall",
110 "-Wcast-qual",
111 "-Wchar-subscripts",
112 "-Wconversion",
113 "-Wcovered-switch-default",
114 "-Wdelete-non-virtual-dtor",
115 "-Werror=return-type",
116 "-Wmismatched-tags",
117 "-Wmissing-braces",
118 "-Wmissing-field-initializers",
119 "-Wnewline-eof",
120 "-Wno-error",
121 "-Wno-long-long",
122 "-Wno-unused-function",
123 "-Wno-unused-parameter",
124 "-Wnon-virtual-dtor",
125 "-Wshadow",
126 "-Wshorten-64-to-32",
127 "-Wsign-compare",
128 "-Wsign-conversion",
129 "-Wstrict-aliasing=2",
130 "-Wstrict-overflow=4",
131 "-Wundef",
132 "-Wunused-parameter",
133 "-Wunused-variable",
134 "-Wwrite-strings",
135 "-Wwrite-strings",
136
137 "-std=c++11",
138 "-pedantic",
139 "-nostdinc++",
140
141 # Use musl-based libc
142 "-D_LIBCPP_HAS_MUSL_LIBC",
143 ]
144 }
145
146 static_library("libcxxabi") {
147 cflags = []
148
149 configs = []
150 configs += [ ":libcxxabi_config" ]
151
152 include_dirs = [
153 "libcxx/include",
154 "libcxxabi/include",
155 ]
156
157 cflags += [
158 "--sysroot",
159 "obj/fusl/sysroot",
160 ]
161
162 complete_static_lib = true
163
164 deps = [
165 "//fusl:sysroot",
166 ]
167
168 sources = [
169 "libcxxabi/src/abort_message.cpp",
170 "libcxxabi/src/cxa_aux_runtime.cpp",
171 "libcxxabi/src/cxa_default_handlers.cpp",
172 "libcxxabi/src/cxa_demangle.cpp",
173 "libcxxabi/src/cxa_exception.cpp",
174 "libcxxabi/src/cxa_exception_storage.cpp",
175 "libcxxabi/src/cxa_guard.cpp",
176 "libcxxabi/src/cxa_handlers.cpp",
177 "libcxxabi/src/cxa_new_delete.cpp",
178 "libcxxabi/src/cxa_personality.cpp",
179 "libcxxabi/src/cxa_thread_atexit.cpp",
180 "libcxxabi/src/cxa_unexpected.cpp",
181 "libcxxabi/src/cxa_vector.cpp",
182 "libcxxabi/src/cxa_virtual.cpp",
183 "libcxxabi/src/exception.cpp",
184 "libcxxabi/src/private_typeinfo.cpp",
185 "libcxxabi/src/stdexcept.cpp",
186 "libcxxabi/src/typeinfo.cpp",
187 ]
188 }
OLDNEW
« no previous file with comments | « fusl/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698