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

Side by Side Diff: build/config/BUILD.gn

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 8 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 | « build/compiler_version.py ('k') | build/config/BUILDCONFIG.gn » ('j') | 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 (c) 2013 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 import("//build/config/allocator.gni")
6 import("//build/config/chrome_build.gni")
7 import("//build/config/crypto.gni")
8 import("//build/config/features.gni")
9 import("//build/config/ui.gni")
10 import("//build/module_args/v8.gni")
11
12 declare_args() {
13 # When set, turns off the (normally-on) iterator debugging and related stuff
14 # that is normally turned on for Debug builds. These are generally useful for
15 # catching bugs but in some cases may cause conflicts or excessive slowness.
16 disable_iterator_debugging = false
17
18 # Set to true to not store any build metadata, e.g. ifdef out all __DATE__
19 # and __TIME__. Set to 0 to reenable the use of these macros in the code
20 # base. See http://crbug.com/314403.
21 #
22 # Continue to embed build meta data in Official builds, basically the
23 # time it was built.
24 # TODO(maruel): This decision should be revisited because having an
25 # official deterministic build has high value too but MSVC toolset can't
26 # generate anything deterministic with WPO enabled AFAIK.
27 dont_embed_build_metadata = !is_official_build
28
29 # Set to true to enable dcheck in Release builds.
30 dcheck_always_on = false
31
32 # Set to true to compile with the OpenGL ES 2.0 conformance tests.
33 internal_gles2_conform_tests = false
34 }
35
36 # TODO(brettw) Most of these should be removed. Instead of global feature
37 # flags, we should have more modular flags that apply only to a target and its
38 # dependents. For example, depending on the "x11" meta-target should define
39 # USE_X11 for all dependents so that everything that could use X11 gets the
40 # define, but anything that doesn't depend on X11 doesn't see it.
41 #
42 # For now we define these globally to match the current GYP build.
43 config("feature_flags") {
44 # TODO(brettw) this probably needs to be parameterized.
45 defines = [ "V8_DEPRECATION_WARNINGS" ] # Don't use deprecated V8 APIs anywhe re.
46
47 if (dcheck_always_on) {
48 defines += [ "DCHECK_ALWAYS_ON=1" ]
49 }
50 if (use_udev) {
51 # TODO(brettw) should probably be "=1".
52 defines += [ "USE_UDEV" ]
53 }
54 if (use_openssl) {
55 defines += [ "USE_OPENSSL=1" ]
56 }
57 if (use_openssl_certs) {
58 defines += [ "USE_OPENSSL_CERTS=1" ]
59 }
60 if (use_nss_certs) {
61 defines += [ "USE_NSS_CERTS=1" ]
62 }
63 if (use_ozone) {
64 defines += [ "USE_OZONE=1" ]
65 }
66 if (use_x11) {
67 defines += [ "USE_X11=1" ]
68 }
69 if (use_allocator != "tcmalloc") {
70 defines += [ "NO_TCMALLOC" ]
71 }
72 if (is_asan || is_lsan || is_tsan || is_msan) {
73 defines += [
74 "MEMORY_TOOL_REPLACES_ALLOCATOR",
75 "MEMORY_SANITIZER_INITIAL_SIZE",
76 ]
77 }
78 if (is_asan) {
79 defines += [ "ADDRESS_SANITIZER" ]
80 }
81 if (is_lsan) {
82 defines += [ "LEAK_SANITIZER" ]
83 }
84 if (is_tsan) {
85 defines += [
86 "THREAD_SANITIZER",
87 "DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1",
88 ]
89 }
90 if (is_msan) {
91 defines += [ "MEMORY_SANITIZER" ]
92 }
93 if (!enable_nacl) {
94 defines += [ "DISABLE_NACL" ]
95 }
96 if (v8_use_external_startup_data) {
97 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
98 }
99 if (is_official_build) {
100 defines += [ "OFFICIAL_BUILD" ]
101 }
102 if (is_chrome_branded) {
103 defines += [ "GOOGLE_CHROME_BUILD" ]
104 } else {
105 defines += [ "CHROMIUM_BUILD" ]
106 }
107 }
108
109 # Debug/release ----------------------------------------------------------------
110
111 config("debug") {
112 defines = [
113 "_DEBUG",
114 "DYNAMIC_ANNOTATIONS_ENABLED=1",
115 ]
116
117 if (is_nacl) {
118 defines += [ "DYNAMIC_ANNOTATIONS_PREFIX=NACL_" ]
119 }
120
121 if (is_linux && !is_android && current_cpu == "x64" &&
122 !disable_iterator_debugging) {
123 # Enable libstdc++ debugging facilities to help catch problems early, see
124 # http://crbug.com/65151 .
125 # TODO(phajdan.jr): Should we enable this for all of POSIX?
126 defines += [ "_GLIBCXX_DEBUG=1" ]
127 }
128 }
129
130 config("release") {
131 defines = [ "NDEBUG" ]
132
133 # Sanitizers.
134 # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this
135 # condition. When Valgrind is set up, we need to do the same here.
136 if (is_tsan) {
137 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=1" ]
138 } else {
139 defines += [ "NVALGRIND" ]
140 if (!is_nacl) {
141 # NaCl always enables dynamic annotations. Currently this value is set to
142 # 1 for all .nexes.
143 defines += [ "DYNAMIC_ANNOTATIONS_ENABLED=0" ]
144 }
145 }
146 }
147
148 # Default libraries ------------------------------------------------------------
149
150 # This config defines the default libraries applied to all targets.
151 config("default_libs") {
152 if (is_android) {
153 # Android uses -nostdlib so we need to add even libc here.
154 libs = [
155 # TODO(brettw) write a version of this, hopefully we can express this
156 # without forking out to GCC just to get the library name. The android
157 # toolchain directory should probably be extracted into a .gni file that
158 # this file and the android toolchain .gn file can share.
159 # # Manually link the libgcc.a that the cross compiler uses.
160 # '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
161 "c",
162 "dl",
163 "m",
164 ]
165 } else if (is_mac) {
166 libs = [
167 "AppKit.framework",
168 "ApplicationServices.framework",
169 "Carbon.framework",
170 "CoreFoundation.framework",
171 "Foundation.framework",
172 "IOKit.framework",
173 "Security.framework",
174 ]
175 } else if (is_ios) {
176 libs = [
177 "CoreFoundation.framework",
178 "CoreGraphics.framework",
179 "CoreText.framework",
180 "Foundation.framework",
181 "UIKit.framework",
182 ]
183 } else if (is_linux) {
184 libs = [ "dl" ]
185 }
186 }
OLDNEW
« no previous file with comments | « build/compiler_version.py ('k') | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698