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

Side by Side Diff: tools/gyp/v8.gyp

Issue 7740020: Refactor .gyp files: (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 9 years, 4 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 | « test/cctest/cctest.gyp ('k') | tools/test-wrapper-gypbuild.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2011 the V8 project authors. All rights reserved. 1 # Copyright 2011 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
11 # with the distribution. 11 # with the distribution.
12 # * Neither the name of Google Inc. nor the names of its 12 # * Neither the name of Google Inc. nor the names of its
13 # contributors may be used to endorse or promote products derived 13 # contributors may be used to endorse or promote products derived
14 # from this software without specific prior written permission. 14 # from this software without specific prior written permission.
15 # 15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 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. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 { 28 {
29 'variables': { 29 'includes': ['../../build/common.gypi'],
30 'use_system_v8%': 0,
31 'msvs_use_common_release': 0,
32 'gcc_version%': 'unknown',
33 'v8_compress_startup_data%': 'off',
34 'v8_target_arch%': '<(target_arch)',
35
36 # Setting 'v8_can_use_unaligned_accesses' to 'true' will allow the code
37 # generated by V8 to do unaligned memory access, and setting it to 'false'
38 # will ensure that the generated code will always do aligned memory
39 # accesses. The default value of 'default' will try to determine the correct
40 # setting. Note that for Intel architectures (ia32 and x64) unaligned memory
41 # access is allowed for all CPUs.
42 'v8_can_use_unaligned_accesses%': 'default',
43
44 # Setting 'v8_can_use_vfp_instructions' to 'true' will enable use of ARM VFP
45 # instructions in the V8 generated code. VFP instructions will be enabled
46 # both for the snapshot and for the ARM target. Leaving the default value
47 # of 'false' will avoid VFP instructions in the snapshot and use CPU feature
48 # probing when running on the target.
49 'v8_can_use_vfp_instructions%': 'false',
50
51 # Setting v8_use_arm_eabi_hardfloat to true will turn on V8 support for ARM
52 # EABI calling convention where double arguments are passed in VFP
53 # registers. Note that the GCC flag '-mfloat-abi=hard' should be used as
54 # well when compiling for the ARM target.
55 'v8_use_arm_eabi_hardfloat%': 'false',
56
57 'v8_enable_debugger_support%': 1,
58
59 # Chrome needs this definition unconditionally. For standalone V8 builds,
60 # it's handled in common.gypi.
61 'want_separate_host_toolset%': 1,
62
63 'v8_use_snapshot%': 'true',
64 'host_os%': '<(OS)',
65 'v8_use_liveobjectlist%': 'false',
66 },
67 'conditions': [ 30 'conditions': [
68 ['use_system_v8==0', { 31 ['use_system_v8==0', {
69 'target_defaults': {
70 'conditions': [
71 ['v8_enable_debugger_support==1', {
72 'defines': ['ENABLE_DEBUGGER_SUPPORT',],
73 },
74 ],
75 ['OS!="mac"', {
76 # TODO(mark): The OS!="mac" conditional is temporary. It can be
77 # removed once the Mac Chromium build stops setting target_arch to
78 # ia32 and instead sets it to mac. Other checks in this file for
79 # OS=="mac" can be removed at that time as well. This can be cleaned
80 # up once http://crbug.com/44205 is fixed.
81 'conditions': [
82 ['v8_target_arch=="arm"', {
83 'defines': [
84 'V8_TARGET_ARCH_ARM',
85 ],
86 'conditions': [
87 [ 'v8_can_use_unaligned_accesses=="true"', {
88 'defines': [
89 'CAN_USE_UNALIGNED_ACCESSES=1',
90 ],
91 }],
92 [ 'v8_can_use_unaligned_accesses=="false"', {
93 'defines': [
94 'CAN_USE_UNALIGNED_ACCESSES=0',
95 ],
96 }],
97 [ 'v8_can_use_vfp_instructions=="true"', {
98 'defines': [
99 'CAN_USE_VFP_INSTRUCTIONS',
100 ],
101 }],
102 [ 'v8_use_arm_eabi_hardfloat=="true"', {
103 'defines': [
104 'USE_EABI_HARDFLOAT=1',
105 'CAN_USE_VFP_INSTRUCTIONS',
106 ],
107 'cflags': [
108 '-mfloat-abi=hard',
109 ],
110 }, {
111 'defines': [
112 'USE_EABI_HARDFLOAT=0',
113 ],
114 }],
115 ],
116 }],
117 ['v8_target_arch=="ia32"', {
118 'defines': [
119 'V8_TARGET_ARCH_IA32',
120 ],
121 }],
122 ['v8_target_arch=="x64"', {
123 'defines': [
124 'V8_TARGET_ARCH_X64',
125 ],
126 }],
127 ],
128 }],
129 ['v8_use_liveobjectlist=="true"', {
130 'defines': [
131 'ENABLE_DEBUGGER_SUPPORT',
132 'INSPECTOR',
133 'OBJECT_PRINT',
134 'LIVEOBJECTLIST',
135 ],
136 }],
137 ['v8_compress_startup_data=="bz2"', {
138 'defines': [
139 'COMPRESS_STARTUP_DATA_BZ2',
140 ],
141 }],
142 ],
143 'configurations': {
144 'Debug': {
145 'defines': [
146 'DEBUG',
147 'ENABLE_DISASSEMBLER',
148 'V8_ENABLE_CHECKS',
149 'OBJECT_PRINT',
150 ],
151 'msvs_settings': {
152 'VCCLCompilerTool': {
153 'Optimization': '0',
154
155 'conditions': [
156 ['OS=="win" and component=="shared_library"', {
157 'RuntimeLibrary': '3', # /MDd
158 }, {
159 'RuntimeLibrary': '1', # /MTd
160 }],
161 ],
162 },
163 'VCLinkerTool': {
164 'LinkIncremental': '2',
165 # For future reference, the stack size needs to be increased
166 # when building for Windows 64-bit, otherwise some test cases
167 # can cause stack overflow.
168 # 'StackReserveSize': '297152',
169 },
170 },
171 'conditions': [
172 ['OS=="freebsd" or OS=="openbsd"', {
173 'cflags': [ '-I/usr/local/include' ],
174 }],
175 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
176 'cflags': [ '-Wall', '-Werror', '-W', '-Wno-unused-parameter',
177 '-Wnon-virtual-dtor' ],
178 }],
179 ],
180 },
181 'Release': {
182 'conditions': [
183 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
184 'cflags!': [
185 '-O2',
186 '-Os',
187 ],
188 'cflags': [
189 '-fomit-frame-pointer',
190 '-O3',
191 ],
192 'conditions': [
193 [ 'gcc_version==44', {
194 'cflags': [
195 # Avoid crashes with gcc 4.4 in the v8 test suite.
196 '-fno-tree-vrp',
197 ],
198 }],
199 ],
200 }],
201 ['OS=="freebsd" or OS=="openbsd"', {
202 'cflags': [ '-I/usr/local/include' ],
203 }],
204 ['OS=="mac"', {
205 'xcode_settings': {
206 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
207
208 # -fstrict-aliasing. Mainline gcc
209 # enables this at -O2 and above,
210 # but Apple gcc does not unless it
211 # is specified explicitly.
212 'GCC_STRICT_ALIASING': 'YES',
213 },
214 }],
215 ['OS=="win"', {
216 'msvs_configuration_attributes': {
217 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
218 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
219 'CharacterSet': '1',
220 },
221 'msvs_settings': {
222 'VCCLCompilerTool': {
223 'Optimization': '2',
224 'InlineFunctionExpansion': '2',
225 'EnableIntrinsicFunctions': 'true',
226 'FavorSizeOrSpeed': '0',
227 'OmitFramePointers': 'true',
228 'StringPooling': 'true',
229
230 'conditions': [
231 ['OS=="win" and component=="shared_library"', {
232 'RuntimeLibrary': '2', #/MD
233 }, {
234 'RuntimeLibrary': '0', #/MT
235 }],
236 ],
237 },
238 'VCLinkerTool': {
239 'LinkIncremental': '1',
240 'OptimizeReferences': '2',
241 'OptimizeForWindows98': '1',
242 'EnableCOMDATFolding': '2',
243 # For future reference, the stack size needs to be
244 # increased when building for Windows 64-bit, otherwise
245 # some test cases can cause stack overflow.
246 # 'StackReserveSize': '297152',
247 },
248 },
249 }],
250 ],
251 },
252 },
253 },
254 'targets': [ 32 'targets': [
255 { 33 {
256 'target_name': 'v8', 34 'target_name': 'v8',
257 'conditions': [ 35 'conditions': [
258 ['want_separate_host_toolset==1', { 36 ['want_separate_host_toolset==1', {
259 'toolsets': ['host', 'target'], 37 'toolsets': ['host', 'target'],
260 }, { 38 }, {
261 'toolsets': ['target'], 39 'toolsets': ['target'],
262 }], 40 }],
263 ['v8_use_snapshot=="true"', { 41 ['v8_use_snapshot=="true"', {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 'target_name': 'v8_snapshot', 87 'target_name': 'v8_snapshot',
310 'type': '<(library)', 88 'type': '<(library)',
311 'conditions': [ 89 'conditions': [
312 ['want_separate_host_toolset==1', { 90 ['want_separate_host_toolset==1', {
313 'toolsets': ['host', 'target'], 91 'toolsets': ['host', 'target'],
314 'dependencies': ['mksnapshot#host', 'js2c#host'], 92 'dependencies': ['mksnapshot#host', 'js2c#host'],
315 }, { 93 }, {
316 'toolsets': ['target'], 94 'toolsets': ['target'],
317 'dependencies': ['mksnapshot', 'js2c'], 95 'dependencies': ['mksnapshot', 'js2c'],
318 }], 96 }],
319 # The ARM assembler assumes the host is 32 bits,
320 # so force building 32-bit host tools.
321 ['v8_target_arch=="arm" and host_arch=="x64"', {
322 'target_conditions': [
323 ['_toolset=="host"', {
324 'cflags': ['-m32'],
325 'ldflags': ['-m32'],
326 }],
327 ],
328 }],
329 ['component=="shared_library"', { 97 ['component=="shared_library"', {
330 'conditions': [ 98 'conditions': [
331 ['OS=="win"', { 99 ['OS=="win"', {
332 'defines': [ 100 'defines': [
333 'BUILDING_V8_SHARED', 101 'BUILDING_V8_SHARED',
334 ], 102 ],
335 'direct_dependent_settings': { 103 'direct_dependent_settings': {
336 'defines': [ 104 'defines': [
337 'USING_V8_SHARED', 105 'USING_V8_SHARED',
338 ], 106 ],
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 ], 193 ],
426 'include_dirs+': [ 194 'include_dirs+': [
427 '../../src', 195 '../../src',
428 ], 196 ],
429 'sources': [ 197 'sources': [
430 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', 198 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
431 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', 199 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
432 '../../src/snapshot-empty.cc', 200 '../../src/snapshot-empty.cc',
433 ], 201 ],
434 'conditions': [ 202 'conditions': [
435 # The ARM assembler assumes the host is 32 bits,
436 # so force building 32-bit host tools.
437 ['v8_target_arch=="arm" and host_arch=="x64"', {
438 'target_conditions': [
439 ['_toolset=="host"', {
440 'cflags': ['-m32'],
441 'ldflags': ['-m32'],
442 }],
443 ],
444 }],
445 ['want_separate_host_toolset==1', { 203 ['want_separate_host_toolset==1', {
446 'toolsets': ['host', 'target'], 204 'toolsets': ['host', 'target'],
447 'dependencies': ['js2c#host'], 205 'dependencies': ['js2c#host'],
448 }, { 206 }, {
449 'toolsets': ['target'], 207 'toolsets': ['target'],
450 'dependencies': ['js2c'], 208 'dependencies': ['js2c'],
451 }], 209 }],
452 ['component=="shared_library"', { 210 ['component=="shared_library"', {
453 'defines': [ 211 'defines': [
454 'BUILDING_V8_SHARED', 212 'BUILDING_V8_SHARED',
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 '../../src/arm/lithium-codegen-arm.h', 503 '../../src/arm/lithium-codegen-arm.h',
746 '../../src/arm/lithium-gap-resolver-arm.cc', 504 '../../src/arm/lithium-gap-resolver-arm.cc',
747 '../../src/arm/lithium-gap-resolver-arm.h', 505 '../../src/arm/lithium-gap-resolver-arm.h',
748 '../../src/arm/macro-assembler-arm.cc', 506 '../../src/arm/macro-assembler-arm.cc',
749 '../../src/arm/macro-assembler-arm.h', 507 '../../src/arm/macro-assembler-arm.h',
750 '../../src/arm/regexp-macro-assembler-arm.cc', 508 '../../src/arm/regexp-macro-assembler-arm.cc',
751 '../../src/arm/regexp-macro-assembler-arm.h', 509 '../../src/arm/regexp-macro-assembler-arm.h',
752 '../../src/arm/simulator-arm.cc', 510 '../../src/arm/simulator-arm.cc',
753 '../../src/arm/stub-cache-arm.cc', 511 '../../src/arm/stub-cache-arm.cc',
754 ], 512 ],
755 'conditions': [
756 # The ARM assembler assumes the host is 32 bits,
757 # so force building 32-bit host tools.
758 ['host_arch=="x64"', {
759 'target_conditions': [
760 ['_toolset=="host"', {
761 'cflags': ['-m32'],
762 'ldflags': ['-m32'],
763 }],
764 ],
765 }],
766 ],
767 }], 513 }],
768 ['v8_target_arch=="ia32" or v8_target_arch=="mac" or OS=="mac"', { 514 ['v8_target_arch=="ia32" or v8_target_arch=="mac" or OS=="mac"', {
769 'sources': [ 515 'sources': [
770 '../../src/ia32/assembler-ia32-inl.h', 516 '../../src/ia32/assembler-ia32-inl.h',
771 '../../src/ia32/assembler-ia32.cc', 517 '../../src/ia32/assembler-ia32.cc',
772 '../../src/ia32/assembler-ia32.h', 518 '../../src/ia32/assembler-ia32.h',
773 '../../src/ia32/builtins-ia32.cc', 519 '../../src/ia32/builtins-ia32.cc',
774 '../../src/ia32/code-stubs-ia32.cc', 520 '../../src/ia32/code-stubs-ia32.cc',
775 '../../src/ia32/code-stubs-ia32.h', 521 '../../src/ia32/code-stubs-ia32.h',
776 '../../src/ia32/codegen-ia32.cc', 522 '../../src/ia32/codegen-ia32.cc',
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 ], 741 ],
996 'sources': [ 742 'sources': [
997 '../../src/mksnapshot.cc', 743 '../../src/mksnapshot.cc',
998 ], 744 ],
999 'conditions': [ 745 'conditions': [
1000 ['want_separate_host_toolset==1', { 746 ['want_separate_host_toolset==1', {
1001 'toolsets': ['host'], 747 'toolsets': ['host'],
1002 }, { 748 }, {
1003 'toolsets': ['target'], 749 'toolsets': ['target'],
1004 }], 750 }],
1005 # The ARM assembler assumes the host is 32 bits,
1006 # so force building 32-bit host tools.
1007 ['v8_target_arch=="arm" and host_arch=="x64"', {
1008 'target_conditions': [
1009 ['_toolset=="host"', {
1010 'cflags': ['-m32'],
1011 'ldflags': ['-m32'],
1012 }],
1013 ],
1014 }],
1015 ['v8_compress_startup_data=="bz2"', { 751 ['v8_compress_startup_data=="bz2"', {
1016 'libraries': [ 752 'libraries': [
1017 '-lbz2', 753 '-lbz2',
1018 ]}], 754 ]}
1019 ] 755 ],
756 ],
1020 }, 757 },
1021 { 758 {
1022 'target_name': 'v8_shell', 759 'target_name': 'v8_shell',
1023 'type': 'executable', 760 'type': 'executable',
1024 'dependencies': [ 761 'dependencies': [
1025 'v8' 762 'v8'
1026 ], 763 ],
1027 'sources': [ 764 'sources': [
1028 '../../samples/shell.cc', 765 '../../samples/shell.cc',
1029 ], 766 ],
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 'targets': [ 807 'targets': [
1071 { 808 {
1072 'target_name': 'v8', 809 'target_name': 'v8',
1073 'type': 'settings', 810 'type': 'settings',
1074 'conditions': [ 811 'conditions': [
1075 ['want_separate_host_toolset==1', { 812 ['want_separate_host_toolset==1', {
1076 'toolsets': ['host', 'target'], 813 'toolsets': ['host', 'target'],
1077 }, { 814 }, {
1078 'toolsets': ['target'], 815 'toolsets': ['target'],
1079 }], 816 }],
1080 # The ARM assembler assumes the host is 32 bits,
1081 # so force building 32-bit host tools.
1082 ['v8_target_arch=="arm" and host_arch=="x64"', {
1083 'target_conditions': [
1084 ['_toolset=="host"', {
1085 'cflags': ['-m32'],
1086 'ldflags': ['-m32'],
1087 }],
1088 ],
1089 }],
1090 ], 817 ],
1091 'link_settings': { 818 'link_settings': {
1092 'libraries': [ 819 'libraries': [
1093 '-lv8', 820 '-lv8',
1094 ], 821 ],
1095 }, 822 },
1096 }, 823 },
1097 { 824 {
1098 'target_name': 'v8_shell', 825 'target_name': 'v8_shell',
1099 'type': 'none', 826 'type': 'none',
1100 'conditions': [ 827 'conditions': [
1101 ['want_separate_host_toolset==1', { 828 ['want_separate_host_toolset==1', {
1102 'toolsets': ['host'], 829 'toolsets': ['host'],
1103 }, { 830 }, {
1104 'toolsets': ['target'], 831 'toolsets': ['target'],
1105 }], 832 }],
1106 ], 833 ],
1107 'dependencies': [ 834 'dependencies': [
1108 'v8' 835 'v8'
1109 ], 836 ],
1110 }, 837 },
1111 ], 838 ],
1112 }], 839 }],
1113 ], 840 ],
1114 } 841 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.gyp ('k') | tools/test-wrapper-gypbuild.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698