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

Side by Side Diff: build/common.gypi

Issue 148883002: Synchronize with r15594. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Makefile ('k') | build/features.gypi » ('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 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are
4 # met:
5 #
6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided
11 # with the distribution.
12 # * Neither the name of Google Inc. nor the names of its
13 # contributors may be used to endorse or promote products derived
14 # from this software without specific prior written permission.
15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 # Shared definitions for all V8-related targets.
29
30 {
31 'variables': {
32 'msvs_use_common_release': 0,
33 'gcc_version%': 'unknown',
34 'CXX%': '${CXX:-$(which g++)}', # Used to assemble a shell command.
35 'v8_compress_startup_data%': 'off',
36 'v8_target_arch%': '<(target_arch)',
37 # Native Client builds currently use the V8 ARM JIT and
38 # arm/simulator-arm.cc to defer the significant effort required
39 # for NaCl JIT support. The nacl_target_arch variable provides
40 # the 'true' target arch for places in this file that need it.
41 # TODO(bradchen): get rid of nacl_target_arch when someday
42 # NaCl V8 builds stop using the ARM simulator
43 'nacl_target_arch%': 'none', # must be set externally
44
45 # Setting 'v8_can_use_unaligned_accesses' to 'true' will allow the code
46 # generated by V8 to do unaligned memory access, and setting it to 'false'
47 # will ensure that the generated code will always do aligned memory
48 # accesses. The default value of 'default' will try to determine the correct
49 # setting. Note that for Intel architectures (ia32 and x64) unaligned memory
50 # access is allowed for all CPUs.
51 'v8_can_use_unaligned_accesses%': 'default',
52
53 # Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP
54 # registers d16-d31 in the generated code, both in the snapshot and for the
55 # ARM target. Leaving the default value of 'false' will avoid the use of
56 # these registers in the snapshot and use CPU feature probing when running
57 # on the target.
58 'v8_can_use_vfp32dregs%': 'false',
59 'arm_test%': 'off',
60
61 # Similar to vfp but on MIPS.
62 'v8_can_use_fpu_instructions%': 'true',
63
64 # Similar to the ARM hard float ABI but on MIPS.
65 'v8_use_mips_abi_hardfloat%': 'true',
66
67 # Default arch variant for MIPS.
68 'mips_arch_variant%': 'mips32r2',
69
70 'v8_enable_debugger_support%': 1,
71
72 'v8_enable_backtrace%': 0,
73
74 'v8_enable_disassembler%': 0,
75
76 'v8_enable_gdbjit%': 0,
77
78 'v8_object_print%': 0,
79
80 # Enable profiling support. Only required on Windows.
81 'v8_enable_prof%': 0,
82
83 'v8_enable_verify_heap%': 0,
84
85 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing.
86 'v8_no_strict_aliasing%': 0,
87
88 # Chrome needs this definition unconditionally. For standalone V8 builds,
89 # it's handled in build/standalone.gypi.
90 'want_separate_host_toolset%': 1,
91
92 'v8_use_snapshot%': 'true',
93 'host_os%': '<(OS)',
94 'werror%': '-Werror',
95
96 # With post mortem support enabled, metadata is embedded into libv8 that
97 # describes various parameters of the VM for use by debuggers. See
98 # tools/gen-postmortem-metadata.py for details.
99 'v8_postmortem_support%': 'false',
100
101 # For a shared library build, results in "libv8-<(soname_version).so".
102 'soname_version%': '',
103
104 # Interpreted regexp engine exists as platform-independent alternative
105 # based where the regular expression is compiled to a bytecode.
106 'v8_interpreted_regexp%': 0,
107
108 # Enable ECMAScript Internationalization API. Enabling this feature will
109 # add a dependency on the ICU library.
110 'v8_enable_i18n_support%': 0,
111 },
112 'target_defaults': {
113 'conditions': [
114 ['v8_enable_debugger_support==1', {
115 'defines': ['ENABLE_DEBUGGER_SUPPORT',],
116 }],
117 ['v8_enable_disassembler==1', {
118 'defines': ['ENABLE_DISASSEMBLER',],
119 }],
120 ['v8_enable_gdbjit==1', {
121 'defines': ['ENABLE_GDB_JIT_INTERFACE',],
122 }],
123 ['v8_object_print==1', {
124 'defines': ['OBJECT_PRINT',],
125 }],
126 ['v8_enable_verify_heap==1', {
127 'defines': ['VERIFY_HEAP',],
128 }],
129 ['v8_interpreted_regexp==1', {
130 'defines': ['V8_INTERPRETED_REGEXP',],
131 }],
132 ['v8_enable_i18n_support==1', {
133 'defines': ['V8_I18N_SUPPORT',],
134 }],
135 ['v8_target_arch=="arm"', {
136 'defines': [
137 'V8_TARGET_ARCH_ARM',
138 ],
139 'target_conditions': [
140 ['_toolset=="host"', {
141 'variables': {
142 'armcompiler': '<!($(echo ${CXX_host:-$(which g++)}) -v 2>&1 | gre p -q "^Target: arm" && echo "yes" || echo "no")',
143 },
144 'conditions': [
145 ['armcompiler=="yes"', {
146 'conditions': [
147 [ 'armv7==1', {
148 'cflags': ['-march=armv7-a',],
149 }],
150 [ 'armv7==1 or armv7=="default"', {
151 'conditions': [
152 [ 'arm_neon==1', {
153 'cflags': ['-mfpu=neon',],
154 },
155 {
156 'conditions': [
157 [ 'arm_fpu!="default"', {
158 'cflags': ['-mfpu=<(arm_fpu)',],
159 }],
160 ],
161 }],
162 ],
163 }],
164 [ 'arm_float_abi!="default"', {
165 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
166 }],
167 [ 'arm_thumb==1', {
168 'cflags': ['-mthumb',],
169 }],
170 [ 'arm_thumb==0', {
171 'cflags': ['-marm',],
172 }],
173 [ 'arm_test=="on"', {
174 'defines': [
175 'ARM_TEST',
176 ],
177 }],
178 ],
179 }, {
180 # armcompiler=="no"
181 'conditions': [
182 [ 'armv7==1 or armv7=="default"', {
183 'defines': [
184 'CAN_USE_ARMV7_INSTRUCTIONS=1',
185 ],
186 'conditions': [
187 [ 'arm_fpu=="default"', {
188 'defines': [
189 'CAN_USE_VFP3_INSTRUCTIONS',
190 ],
191 }],
192 [ 'arm_fpu=="vfpv3-d16"', {
193 'defines': [
194 'CAN_USE_VFP3_INSTRUCTIONS',
195 ],
196 }],
197 [ 'arm_fpu=="vfpv3"', {
198 'defines': [
199 'CAN_USE_VFP3_INSTRUCTIONS',
200 'CAN_USE_VFP32DREGS',
201 ],
202 }],
203 [ 'arm_fpu=="neon" or arm_neon==1', {
204 'defines': [
205 'CAN_USE_VFP3_INSTRUCTIONS',
206 'CAN_USE_VFP32DREGS',
207 ],
208 }],
209 ],
210 }],
211 [ 'arm_float_abi=="hard"', {
212 'defines': [
213 'USE_EABI_HARDFLOAT=1',
214 ],
215 }],
216 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
217 'defines': [
218 'USE_EABI_HARDFLOAT=0',
219 ],
220 }],
221 ],
222 'defines': [
223 'ARM_TEST',
224 ],
225 }],
226 ],
227 }], # _toolset=="host"
228 ['_toolset=="target"', {
229 'variables': {
230 'armcompiler': '<!($(echo ${CXX_target:-<(CXX)}) -v 2>&1 | grep -q "^Target: arm" && echo "yes" || echo "no")',
231 },
232 'conditions': [
233 ['armcompiler=="yes"', {
234 'conditions': [
235 [ 'armv7==1', {
236 'cflags': ['-march=armv7-a',],
237 }],
238 [ 'armv7==1 or armv7=="default"', {
239 'conditions': [
240 [ 'arm_neon==1', {
241 'cflags': ['-mfpu=neon',],
242 },
243 {
244 'conditions': [
245 [ 'arm_fpu!="default"', {
246 'cflags': ['-mfpu=<(arm_fpu)',],
247 }],
248 ],
249 }],
250 ],
251 }],
252 [ 'arm_float_abi!="default"', {
253 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
254 }],
255 [ 'arm_thumb==1', {
256 'cflags': ['-mthumb',],
257 }],
258 [ 'arm_thumb==0', {
259 'cflags': ['-marm',],
260 }],
261 [ 'arm_test=="on"', {
262 'defines': [
263 'ARM_TEST',
264 ],
265 }],
266 ],
267 }, {
268 # armcompiler=="no"
269 'conditions': [
270 [ 'armv7==1 or armv7=="default"', {
271 'defines': [
272 'CAN_USE_ARMV7_INSTRUCTIONS=1',
273 ],
274 'conditions': [
275 [ 'arm_fpu=="default"', {
276 'defines': [
277 'CAN_USE_VFP3_INSTRUCTIONS',
278 ],
279 }],
280 [ 'arm_fpu=="vfpv3-d16"', {
281 'defines': [
282 'CAN_USE_VFP3_INSTRUCTIONS',
283 ],
284 }],
285 [ 'arm_fpu=="vfpv3"', {
286 'defines': [
287 'CAN_USE_VFP3_INSTRUCTIONS',
288 'CAN_USE_VFP32DREGS',
289 ],
290 }],
291 [ 'arm_fpu=="neon" or arm_neon==1', {
292 'defines': [
293 'CAN_USE_VFP3_INSTRUCTIONS',
294 'CAN_USE_VFP32DREGS',
295 ],
296 }],
297 ],
298 }],
299 [ 'arm_float_abi=="hard"', {
300 'defines': [
301 'USE_EABI_HARDFLOAT=1',
302 ],
303 }],
304 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
305 'defines': [
306 'USE_EABI_HARDFLOAT=0',
307 ],
308 }],
309 ],
310 'defines': [
311 'ARM_TEST',
312 ],
313 }],
314 ],
315 }], # _toolset=="target"
316 ],
317 }], # v8_target_arch=="arm"
318 ['v8_target_arch=="a64"', {
319 'defines': [
320 'V8_TARGET_ARCH_A64',
321 ],
322 }],
323 ['v8_target_arch=="ia32"', {
324 'defines': [
325 'V8_TARGET_ARCH_IA32',
326 ],
327 }], # v8_target_arch=="ia32"
328 ['v8_target_arch=="mipsel"', {
329 'defines': [
330 'V8_TARGET_ARCH_MIPS',
331 ],
332 'variables': {
333 'mipscompiler': '<!($(echo <(CXX)) -v 2>&1 | grep -q "^Target: mips" & & echo "yes" || echo "no")',
334 },
335 'conditions': [
336 ['mipscompiler=="yes"', {
337 'target_conditions': [
338 ['_toolset=="target"', {
339 'cflags': ['-EL'],
340 'ldflags': ['-EL'],
341 'conditions': [
342 [ 'v8_use_mips_abi_hardfloat=="true"', {
343 'cflags': ['-mhard-float'],
344 'ldflags': ['-mhard-float'],
345 }, {
346 'cflags': ['-msoft-float'],
347 'ldflags': ['-msoft-float'],
348 }],
349 ['mips_arch_variant=="mips32r2"', {
350 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
351 }],
352 ['mips_arch_variant=="mips32r1"', {
353 'cflags': ['-mips32', '-Wa,-mips32'],
354 }],
355 ['mips_arch_variant=="loongson"', {
356 'cflags': ['-mips3', '-Wa,-mips3'],
357 }],
358 ],
359 }],
360 ],
361 }],
362 [ 'v8_can_use_fpu_instructions=="true"', {
363 'defines': [
364 'CAN_USE_FPU_INSTRUCTIONS',
365 ],
366 }],
367 [ 'v8_use_mips_abi_hardfloat=="true"', {
368 'defines': [
369 '__mips_hard_float=1',
370 'CAN_USE_FPU_INSTRUCTIONS',
371 ],
372 }, {
373 'defines': [
374 '__mips_soft_float=1'
375 ],
376 }],
377 ['mips_arch_variant=="mips32r2"', {
378 'defines': ['_MIPS_ARCH_MIPS32R2',],
379 }],
380 ['mips_arch_variant=="loongson"', {
381 'defines': ['_MIPS_ARCH_LOONGSON',],
382 }],
383 ],
384 }], # v8_target_arch=="mipsel"
385 ['v8_target_arch=="x64"', {
386 'defines': [
387 'V8_TARGET_ARCH_X64',
388 ],
389 'xcode_settings': {
390 'ARCHS': [ 'x86_64' ],
391 },
392 'msvs_settings': {
393 'VCLinkerTool': {
394 'StackReserveSize': '2097152',
395 },
396 },
397 'msvs_configuration_platform': 'x64',
398 }], # v8_target_arch=="x64"
399 ['v8_compress_startup_data=="bz2"', {
400 'defines': [
401 'COMPRESS_STARTUP_DATA_BZ2',
402 ],
403 }],
404 ['OS=="win"', {
405 'defines': [
406 'WIN32',
407 ],
408 'msvs_configuration_attributes': {
409 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
410 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
411 'CharacterSet': '1',
412 },
413 }],
414 ['OS=="win" and v8_enable_prof==1', {
415 'msvs_settings': {
416 'VCLinkerTool': {
417 'GenerateMapFile': 'true',
418 },
419 },
420 }],
421 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
422 or OS=="netbsd"', {
423 'conditions': [
424 [ 'v8_no_strict_aliasing==1', {
425 'cflags': [ '-fno-strict-aliasing' ],
426 }],
427 ], # conditions
428 }],
429 ['OS=="solaris"', {
430 'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
431 }],
432 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
433 or OS=="netbsd" or OS=="mac" or OS=="android") and \
434 (v8_target_arch=="arm" or v8_target_arch=="ia32" or \
435 v8_target_arch=="mipsel")', {
436 # Check whether the host compiler and target compiler support the
437 # '-m32' option and set it if so.
438 'target_conditions': [
439 ['_toolset=="host"', {
440 'variables': {
441 'm32flag': '<!((echo | $(echo ${CXX_host:-$(which g++)}) -m32 -E - > /dev/null 2>&1) && echo "-m32" || true)',
442 },
443 'cflags': [ '<(m32flag)' ],
444 'ldflags': [ '<(m32flag)' ],
445 'xcode_settings': {
446 'ARCHS': [ 'i386' ],
447 },
448 }],
449 ['_toolset=="target"', {
450 'variables': {
451 'm32flag': '<!((echo | $(echo ${CXX_target:-<(CXX)}) -m32 -E - > / dev/null 2>&1) && echo "-m32" || true)',
452 'clang%': 0,
453 },
454 'conditions': [
455 ['(OS!="android" or clang==1) and \
456 nacl_target_arch!="nacl_x64"', {
457 'cflags': [ '<(m32flag)' ],
458 'ldflags': [ '<(m32flag)' ],
459 }],
460 ],
461 'xcode_settings': {
462 'ARCHS': [ 'i386' ],
463 },
464 }],
465 ],
466 }],
467 ['(OS=="linux") and (v8_target_arch=="x64")', {
468 # Check whether the host compiler and target compiler support the
469 # '-m64' option and set it if so.
470 'target_conditions': [
471 ['_toolset=="host"', {
472 'variables': {
473 'm64flag': '<!((echo | $(echo ${CXX_host:-$(which g++)}) -m64 -E - > /dev/null 2>&1) && echo "-m64" || true)',
474 },
475 'cflags': [ '<(m64flag)' ],
476 'ldflags': [ '<(m64flag)' ],
477 }],
478 ['_toolset=="target"', {
479 'variables': {
480 'm64flag': '<!((echo | $(echo ${CXX_target:-<(CXX)}) -m64 -E - > / dev/null 2>&1) && echo "-m64" || true)',
481 },
482 'cflags': [ '<(m64flag)' ],
483 'ldflags': [ '<(m64flag)' ],
484 }]
485 ],
486 }],
487 ['OS=="freebsd" or OS=="openbsd"', {
488 'cflags': [ '-I/usr/local/include' ],
489 }],
490 ['OS=="netbsd"', {
491 'cflags': [ '-I/usr/pkg/include' ],
492 }],
493 ], # conditions
494 'configurations': {
495 'Debug': {
496 'variables': {
497 'v8_enable_extra_checks%': 1,
498 },
499 'defines': [
500 'DEBUG',
501 'ENABLE_DISASSEMBLER',
502 'V8_ENABLE_CHECKS',
503 'OBJECT_PRINT',
504 'VERIFY_HEAP',
505 ],
506 'msvs_settings': {
507 'VCCLCompilerTool': {
508 'Optimization': '0',
509
510 'conditions': [
511 ['OS=="win" and component=="shared_library"', {
512 'RuntimeLibrary': '3', # /MDd
513 }, {
514 'RuntimeLibrary': '1', # /MTd
515 }],
516 ],
517 },
518 'VCLinkerTool': {
519 'LinkIncremental': '2',
520 },
521 },
522 'conditions': [
523 ['v8_enable_extra_checks==1', {
524 'defines': ['ENABLE_EXTRA_CHECKS',],
525 }],
526 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
527 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
528 '-Wnon-virtual-dtor', '-Woverloaded-virtual',
529 # Hide some GCC 4.8 warnings:
530 # TODO(jbramley): Only enable these on GCC 4.8.
531 '-Wno-unused-local-typedefs',
532 '-Wno-maybe-uninitialized' ],
533 }],
534 ['OS=="linux" and v8_enable_backtrace==1', {
535 # Support for backtrace_symbols.
536 'ldflags': [ '-rdynamic' ],
537 }],
538 ['OS=="android"', {
539 'variables': {
540 'android_full_debug%': 1,
541 },
542 'conditions': [
543 ['android_full_debug==0', {
544 # Disable full debug if we want a faster v8 in a debug build.
545 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG.
546 'defines!': [
547 'DEBUG',
548 ],
549 }],
550 ],
551 }],
552 ['OS=="mac"', {
553 'xcode_settings': {
554 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
555 },
556 }],
557 ],
558 }, # Debug
559 'Release': {
560 'variables': {
561 'v8_enable_extra_checks%': 0,
562 },
563 'conditions': [
564 ['v8_enable_extra_checks==1', {
565 'defines': ['ENABLE_EXTRA_CHECKS',],
566 }],
567 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
568 'cflags!': [
569 '-O2',
570 '-Os',
571 ],
572 'cflags': [
573 '-fdata-sections',
574 '-ffunction-sections',
575 '-O3',
576 # Hide some GCC 4.8 warnings:
577 # TODO(jbramley): Only enable these on GCC 4.8.
578 '-Wno-unused-local-typedefs',
579 '-Wno-maybe-uninitialized',
580 ],
581 'conditions': [
582 [ 'gcc_version==44 and clang==0', {
583 'cflags': [
584 # Avoid crashes with gcc 4.4 in the v8 test suite.
585 '-fno-tree-vrp',
586 ],
587 }],
588 ],
589 }],
590 ['OS=="android"', {
591 'cflags!': [
592 '-O3',
593 '-Os',
594 ],
595 'cflags': [
596 '-fdata-sections',
597 '-ffunction-sections',
598 '-O2',
599 ],
600 'conditions': [
601 [ 'gcc_version==44 and clang==0', {
602 'cflags': [
603 # Avoid crashes with gcc 4.4 in the v8 test suite.
604 '-fno-tree-vrp',
605 ],
606 }],
607 ],
608 }],
609 ['OS=="mac"', {
610 'xcode_settings': {
611 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
612
613 # -fstrict-aliasing. Mainline gcc
614 # enables this at -O2 and above,
615 # but Apple gcc does not unless it
616 # is specified explicitly.
617 'GCC_STRICT_ALIASING': 'YES',
618 },
619 }], # OS=="mac"
620 ['OS=="win"', {
621 'msvs_settings': {
622 'VCCLCompilerTool': {
623 'Optimization': '2',
624 'InlineFunctionExpansion': '2',
625 'EnableIntrinsicFunctions': 'true',
626 'FavorSizeOrSpeed': '0',
627 'StringPooling': 'true',
628 'conditions': [
629 ['OS=="win" and component=="shared_library"', {
630 'RuntimeLibrary': '2', #/MD
631 }, {
632 'RuntimeLibrary': '0', #/MT
633 }],
634 ['v8_target_arch=="x64"', {
635 # TODO(2207): remove this option once the bug is fixed.
636 'WholeProgramOptimization': 'true',
637 }],
638 ],
639 },
640 'VCLinkerTool': {
641 'LinkIncremental': '1',
642 'OptimizeReferences': '2',
643 'EnableCOMDATFolding': '2',
644 },
645 },
646 }], # OS=="win"
647 ], # conditions
648 }, # Release
649 }, # configurations
650 }, # target_defaults
651 }
OLDNEW
« no previous file with comments | « Makefile ('k') | build/features.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698