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

Side by Side Diff: build/common.gypi

Issue 100352: Creates a set of target defaults for building on ARM processors. Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | Annotate | Revision Log
« 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 (c) 2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2009 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 { 5 {
6 'variables': { 6 'variables': {
7 # .gyp files should set chromium_code to 1 if they build Chromium-specific 7 # .gyp files should set chromium_code to 1 if they build Chromium-specific
8 # code, as opposed to external code. This variable is used to control 8 # code, as opposed to external code. This variable is used to control
9 # such things as the set of warnings to enable, and whether warnings are 9 # such things as the set of warnings to enable, and whether warnings are
10 # treated as errors. 10 # treated as errors.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 # can add the following line (without the #) to ~/.gyp/include.gypi 42 # can add the following line (without the #) to ~/.gyp/include.gypi
43 # {'variables': {'library': 'shared_library'}} 43 # {'variables': {'library': 'shared_library'}}
44 # to compile as shared by default 44 # to compile as shared by default
45 'library%': 'static_library', 45 'library%': 'static_library',
46 46
47 # TODO(bradnelson): eliminate this when possible. 47 # TODO(bradnelson): eliminate this when possible.
48 # To allow local gyp files to prevent release.vsprops from being included. 48 # To allow local gyp files to prevent release.vsprops from being included.
49 # Yes(1) means include release.vsprops. 49 # Yes(1) means include release.vsprops.
50 # Once all vsprops settings are migrated into gyp, this can go away. 50 # Once all vsprops settings are migrated into gyp, this can go away.
51 'msvs_use_common_release%': 1, 51 'msvs_use_common_release%': 1,
52
53 # The architecture that we're building on.
54 'target_arch%': 'IA32',
52 }, 55 },
53 'target_defaults': { 56 'target_defaults': {
54 'conditions': [ 57 'conditions': [
58 ['target_arch=="ARM"', {
59 'defines': ['__ARMEL__'],
60 }],
55 ['branding=="Chrome"', { 61 ['branding=="Chrome"', {
56 'defines': ['GOOGLE_CHROME_BUILD'], 62 'defines': ['GOOGLE_CHROME_BUILD'],
57 }, { # else: branding!="Chrome" 63 }, { # else: branding!="Chrome"
58 'defines': ['CHROMIUM_BUILD'], 64 'defines': ['CHROMIUM_BUILD'],
59 }], 65 }],
60 ['coverage!=0', { 66 ['coverage!=0', {
61 'conditions': [ 67 'conditions': [
62 ['OS=="mac"', { 68 ['OS=="mac"', {
63 'xcode_settings': { 69 'xcode_settings': {
64 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', 70 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES',
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 'configuration_platform': 'Win32', 138 'configuration_platform': 'Win32',
133 'msvs_props': ['release.vsprops'], 139 'msvs_props': ['release.vsprops'],
134 }], 140 }],
135 ], 141 ],
136 }, 142 },
137 }, 143 },
138 }, 144 },
139 'conditions': [ 145 'conditions': [
140 [ 'OS=="linux"', { 146 [ 'OS=="linux"', {
141 'target_defaults': { 147 'target_defaults': {
142 'asflags': [
143 # Needed so that libs with .s files (e.g. libicudata.a)
144 # are compatible with the general 32-bit-ness.
145 '-32',
146 ],
147 # Enable -Werror by default, but put it in a variable so it can 148 # Enable -Werror by default, but put it in a variable so it can
148 # be disabled in ~/.gyp/include.gypi on the valgrind builders. 149 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
149 'variables': { 150 'variables': {
150 'werror%': '-Werror', 151 'werror%': '-Werror',
151 }, 152 },
152 # All floating-point computations on x87 happens in 80-bit
153 # precision. Because the C and C++ language standards allow
154 # the compiler to keep the floating-point values in higher
155 # precision than what's specified in the source and doing so
156 # is more efficient than constantly rounding up to 64-bit or
157 # 32-bit precision as specified in the source, the compiler,
158 # especially in the optimized mode, tries very hard to keep
159 # values in x87 floating-point stack (in 80-bit precision)
160 # as long as possible. This has important side effects, that
161 # the real value used in computation may change depending on
162 # how the compiler did the optimization - that is, the value
163 # kept in 80-bit is different than the value rounded down to
164 # 64-bit or 32-bit. There are possible compiler options to make
165 # this behavior consistent (e.g. -ffloat-store would keep all
166 # floating-values in the memory, thus force them to be rounded
167 # to its original precision) but they have significant runtime
168 # performance penalty.
169 #
170 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
171 # which keep floating-point values in SSE registers in its
172 # native precision (32-bit for single precision, and 64-bit for
173 # double precision values). This means the floating-point value
174 # used during computation does not change depending on how the
175 # compiler optimized the code, since the value is always kept
176 # in its specified precision.
177 'cflags': [ 153 'cflags': [
178 '-m32', 154 '<(werror)', # See note above about the werror variable.
179 '-pthread',
180 '-march=pentium4',
181 '-fno-exceptions',
182 '-msse2',
183 '-mfpmath=sse',
184 '-Wall',
185 '<(werror)', # See note above about the werror variable.
186 ],
187 'ldflags': [
188 '-m32',
189 '-pthread',
190 ], 155 ],
191 'scons_variable_settings': { 156 'scons_variable_settings': {
192 'LIBPATH': ['$LIB_DIR'], 157 'LIBPATH': ['$LIB_DIR'],
193 # Linking of large files uses lots of RAM, so serialize links 158 # Linking of large files uses lots of RAM, so serialize links
194 # using the handy flock command from util-linux. 159 # using the handy flock command from util-linux.
195 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], 160 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
196 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], 161 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
197 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], 162 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
198 163
199 # We have several cases where archives depend on each other in 164 # We have several cases where archives depend on each other in
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 }, 247 },
283 'profile': { 248 'profile': {
284 'cflags': ['-pg', '-g'], 249 'cflags': ['-pg', '-g'],
285 'ldflags': ['-pg'], 250 'ldflags': ['-pg'],
286 }, 251 },
287 'symbols': { 252 'symbols': {
288 'cflags': ['-g'], 253 'cflags': ['-g'],
289 }, 254 },
290 }, 255 },
291 }, 256 },
257 'conditions': [
258 [ 'target_arch=="ARM"', {
259 'target_defaults': {
260 'cflags': [
261 '-pthread',
262 '-fno-exceptions',
263 '-Wall',
264 ],
265 'ldflags': [
266 '-pthread',
267 ],
268 },
269 }, { # else: target_arch != ARM
270 'target_defaults': {
271 'asflags': [
272 # Needed so that libs with .s files (e.g. libicudata.a)
273 # are compatible with the general 32-bit-ness.
274 '-32',
275 ],
276 # All floating-point computations on x87 happens in 80-bit
277 # precision. Because the C and C++ language standards allow
278 # the compiler to keep the floating-point values in higher
279 # precision than what's specified in the source and doing so
280 # is more efficient than constantly rounding up to 64-bit or
281 # 32-bit precision as specified in the source, the compiler,
282 # especially in the optimized mode, tries very hard to keep
283 # values in x87 floating-point stack (in 80-bit precision)
284 # as long as possible. This has important side effects, that
285 # the real value used in computation may change depending on
286 # how the compiler did the optimization - that is, the value
287 # kept in 80-bit is different than the value rounded down to
288 # 64-bit or 32-bit. There are possible compiler options to make
289 # this behavior consistent (e.g. -ffloat-store would keep all
290 # floating-values in the memory, thus force them to be rounded
291 # to its original precision) but they have significant runtime
292 # performance penalty.
293 #
294 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
295 # which keep floating-point values in SSE registers in its
296 # native precision (32-bit for single precision, and 64-bit for
297 # double precision values). This means the floating-point value
298 # used during computation does not change depending on how the
299 # compiler optimized the code, since the value is always kept
300 # in its specified precision.
301 'cflags': [
302 '-m32',
303 '-pthread',
304 '-march=pentium4',
305 '-fno-exceptions',
306 '-msse2',
307 '-mfpmath=sse',
308 '-Wall',
309 ],
310 'ldflags': [
311 '-m32',
312 '-pthread',
313 ],
314 },
315 }],
316 ],
292 }], 317 }],
293 ['OS=="mac"', { 318 ['OS=="mac"', {
294 'target_defaults': { 319 'target_defaults': {
295 'mac_bundle': 0, 320 'mac_bundle': 0,
296 'xcode_settings': { 321 'xcode_settings': {
297 'ALWAYS_SEARCH_USER_PATHS': 'NO', 322 'ALWAYS_SEARCH_USER_PATHS': 'NO',
298 'GCC_C_LANGUAGE_STANDARD': 'c99', 323 'GCC_C_LANGUAGE_STANDARD': 'c99',
299 'GCC_CW_ASM_SYNTAX': 'NO', 324 'GCC_CW_ASM_SYNTAX': 'NO',
300 'GCC_ENABLE_PASCAL_STRINGS': 'NO', 325 'GCC_ENABLE_PASCAL_STRINGS': 'NO',
301 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', 326 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 # settings in target dicts. SYMROOT is a special case, because many other 457 # settings in target dicts. SYMROOT is a special case, because many other
433 # Xcode variables depend on it, including variables such as 458 # Xcode variables depend on it, including variables such as
434 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 459 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
435 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 460 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
436 # files to appear (when present) in the UI as actual files and not red 461 # files to appear (when present) in the UI as actual files and not red
437 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 462 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
438 # and therefore SYMROOT, needs to be set at the project level. 463 # and therefore SYMROOT, needs to be set at the project level.
439 'SYMROOT': '<(DEPTH)/xcodebuild', 464 'SYMROOT': '<(DEPTH)/xcodebuild',
440 }, 465 },
441 } 466 }
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