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

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: Finish c++ bits Created 4 years, 10 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
« fusl/BUILD.gn ('K') | « fusl/tools/copy_libcxx_headers.py ('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-unused-parameter",
31 "-Wno-unused-parameter",
32 "-Wnon-virtual-dtor",
33 "-Wwrite-strings",
34
35 "-std=c++11",
36 "-nostdinc++",
37
38 # Use musl-based libc
39 "-D_LIBCPP_HAS_MUSL_LIBC",
40
41 # Build fixes for musl.
42 "-Wno-invalid-constexpr",
43 ]
44 }
45
46 static_library("libcxx") {
47 cflags = []
48
49 configs = []
50 configs += [ ":libcxx_config" ]
51
52 include_dirs = [
53 "libcxx/include",
54 "libcxxabi/include",
55 ]
56
57 cflags += [ "--sysroot=fusl_x64/sysroot" ]
58
59 complete_static_lib = true
60
61 deps = [
62 "//fusl:finish_sysroot",
63 ]
64
65 sources = [
66 "libcxx/src/algorithm.cpp",
67 "libcxx/src/any.cpp",
68 "libcxx/src/bind.cpp",
69 "libcxx/src/chrono.cpp",
70 "libcxx/src/condition_variable.cpp",
71 "libcxx/src/debug.cpp",
72 "libcxx/src/exception.cpp",
73 "libcxx/src/future.cpp",
74 "libcxx/src/hash.cpp",
75 "libcxx/src/ios.cpp",
76 "libcxx/src/iostream.cpp",
77 "libcxx/src/locale.cpp",
78 "libcxx/src/memory.cpp",
79 "libcxx/src/mutex.cpp",
80 "libcxx/src/new.cpp",
81 "libcxx/src/optional.cpp",
82 "libcxx/src/random.cpp",
83 "libcxx/src/regex.cpp",
84 "libcxx/src/shared_mutex.cpp",
85 "libcxx/src/stdexcept.cpp",
86 "libcxx/src/string.cpp",
87 "libcxx/src/strstream.cpp",
88 "libcxx/src/system_error.cpp",
89 "libcxx/src/thread.cpp",
90 "libcxx/src/typeinfo.cpp",
91 "libcxx/src/utility.cpp",
92 "libcxx/src/valarray.cpp",
93 ]
94 }
95
96 config("libcxxabi_config") {
97 cflags = [
98 # Flags from upstream CMake build
99 "-D_DEBUG",
100 "-D__STDC_CONSTANT_MACROS",
101 "-D__STDC_FORMAT_MACROS",
102 "-D__STDC_LIMIT_MACROS",
103
104 "-fPIC",
105 "-fstrict-aliasing",
106 "-fvisibility-inlines-hidden",
107
108 "-Wall",
109 "-Wcast-qual",
110 "-Wchar-subscripts",
111 "-Wconversion",
112 "-Wcovered-switch-default",
113 "-Wdelete-non-virtual-dtor",
114 "-Werror=return-type",
115 "-Wmismatched-tags",
116 "-Wmissing-braces",
117 "-Wmissing-field-initializers",
118 "-Wnewline-eof",
119 "-Wno-error",
120 "-Wno-long-long",
121 "-Wno-unused-function",
122 "-Wno-unused-parameter",
123 "-Wnon-virtual-dtor",
124 "-Wshadow",
125 "-Wshorten-64-to-32",
126 "-Wsign-compare",
127 "-Wsign-conversion",
128 "-Wstrict-aliasing=2",
129 "-Wstrict-overflow=4",
130 "-Wundef",
131 "-Wunused-parameter",
132 "-Wunused-variable",
133 "-Wwrite-strings",
134 "-Wwrite-strings",
135
136 "-std=c++11",
137 "-pedantic",
138 "-nostdinc++",
139
140 # Use musl-based libc
141 "-D_LIBCPP_HAS_MUSL_LIBC",
142 ]
143 }
144
145 static_library("libcxxabi") {
146 cflags = []
147
148 configs = []
149 configs += [ ":libcxxabi_config" ]
150
151 include_dirs = [
152 "libcxx/include",
153 "libcxxabi/include",
154 ]
155
156 cflags += [ "--sysroot=fusl_x64/sysroot" ]
157
158 complete_static_lib = true
159
160 deps = [
161 "//fusl:finish_sysroot",
162 ]
163
164 sources = [
165 "libcxxabi/src/abort_message.cpp",
166 "libcxxabi/src/cxa_aux_runtime.cpp",
167 "libcxxabi/src/cxa_default_handlers.cpp",
168 "libcxxabi/src/cxa_demangle.cpp",
169 "libcxxabi/src/cxa_exception.cpp",
170 "libcxxabi/src/cxa_exception_storage.cpp",
171 "libcxxabi/src/cxa_guard.cpp",
172 "libcxxabi/src/cxa_handlers.cpp",
173 "libcxxabi/src/cxa_new_delete.cpp",
174 "libcxxabi/src/cxa_personality.cpp",
175 "libcxxabi/src/cxa_thread_atexit.cpp",
176 "libcxxabi/src/cxa_unexpected.cpp",
177 "libcxxabi/src/cxa_vector.cpp",
178 "libcxxabi/src/cxa_virtual.cpp",
179 "libcxxabi/src/exception.cpp",
180 "libcxxabi/src/private_typeinfo.cpp",
181 "libcxxabi/src/stdexcept.cpp",
182 "libcxxabi/src/typeinfo.cpp",
183 ]
184 }
OLDNEW
« fusl/BUILD.gn ('K') | « fusl/tools/copy_libcxx_headers.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698