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

Side by Side Diff: build/common.gypi

Issue 10416005: Some cleanup to common.gypi. This fixes some host/target combinations that weren't working in the M… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 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
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 }], 103 }],
104 ['v8_enable_disassembler==1', { 104 ['v8_enable_disassembler==1', {
105 'defines': ['ENABLE_DISASSEMBLER',], 105 'defines': ['ENABLE_DISASSEMBLER',],
106 }], 106 }],
107 ['v8_object_print==1', { 107 ['v8_object_print==1', {
108 'defines': ['OBJECT_PRINT',], 108 'defines': ['OBJECT_PRINT',],
109 }], 109 }],
110 ['v8_enable_gdbjit==1', { 110 ['v8_enable_gdbjit==1', {
111 'defines': ['ENABLE_GDB_JIT_INTERFACE',], 111 'defines': ['ENABLE_GDB_JIT_INTERFACE',],
112 }], 112 }],
113 ['OS!="mac"', { 113 ['v8_target_arch=="arm"', {
114 # TODO(mark): The OS!="mac" conditional is temporary. It can be 114 'defines': [
115 # removed once the Mac Chromium build stops setting target_arch to 115 'V8_TARGET_ARCH_ARM',
116 # ia32 and instead sets it to mac. Other checks in this file for 116 ],
117 # OS=="mac" can be removed at that time as well. This can be cleaned
118 # up once http://crbug.com/44205 is fixed.
119 'conditions': [ 117 'conditions': [
120 ['v8_target_arch=="arm"', { 118 [ 'v8_can_use_unaligned_accesses=="true"', {
121 'defines': [ 119 'defines': [
122 'V8_TARGET_ARCH_ARM', 120 'CAN_USE_UNALIGNED_ACCESSES=1',
123 ], 121 ],
124 'conditions': [ 122 }],
125 [ 'v8_can_use_unaligned_accesses=="true"', { 123 [ 'v8_can_use_unaligned_accesses=="false"', {
126 'defines': [ 124 'defines': [
127 'CAN_USE_UNALIGNED_ACCESSES=1', 125 'CAN_USE_UNALIGNED_ACCESSES=0',
128 ], 126 ],
127 }],
128 [ 'v8_can_use_vfp_instructions=="true"', {
129 'defines': [
130 'CAN_USE_VFP_INSTRUCTIONS',
131 ],
132 }],
133 [ 'v8_use_arm_eabi_hardfloat=="true"', {
134 'defines': [
135 'USE_EABI_HARDFLOAT=1',
136 'CAN_USE_VFP_INSTRUCTIONS',
137 ],
138 'target_conditions': [
139 ['_toolset=="target"', {
140 'cflags': ['-mfloat-abi=hard',],
129 }], 141 }],
130 [ 'v8_can_use_unaligned_accesses=="false"', { 142 ],
131 'defines': [ 143 }, {
132 'CAN_USE_UNALIGNED_ACCESSES=0', 144 'defines': [
133 ], 145 'USE_EABI_HARDFLOAT=0',
134 }], 146 ],
135 [ 'v8_can_use_vfp_instructions=="true"', { 147 }],
136 'defines': [ 148 ],
137 'CAN_USE_VFP_INSTRUCTIONS', 149 }], # v8_target_arch=="arm"
138 ], 150 ['v8_target_arch=="ia32"', {
139 }], 151 'defines': [
140 [ 'v8_use_arm_eabi_hardfloat=="true"', { 152 'V8_TARGET_ARCH_IA32',
141 'defines': [ 153 ],
142 'USE_EABI_HARDFLOAT=1', 154 }], # v8_target_arch=="ia32"
143 'CAN_USE_VFP_INSTRUCTIONS', 155 ['v8_target_arch=="mips"', {
144 ], 156 'defines': [
145 'target_conditions': [ 157 'V8_TARGET_ARCH_MIPS',
146 ['_toolset=="target"', { 158 ],
147 'cflags': ['-mfloat-abi=hard',], 159 'variables': {
160 'mipscompiler': '<!($(echo ${CXX:-$(which g++)}) -v 2>&1 | grep -q "^T arget: mips-" && echo "yes" || echo "no")',
161 },
162 'conditions': [
163 ['mipscompiler=="yes"', {
164 'target_conditions': [
165 ['_toolset=="target"', {
166 'cflags': ['-EL'],
167 'ldflags': ['-EL'],
168 'conditions': [
169 [ 'v8_use_mips_abi_hardfloat=="true"', {
170 'cflags': ['-mhard-float'],
171 'ldflags': ['-mhard-float'],
172 }, {
173 'cflags': ['-msoft-float'],
174 'ldflags': ['-msoft-float'],
148 }], 175 }],
149 ], 176 ['mips_arch_variant=="mips32r2"', {
150 }, { 177 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
151 'defines': [ 178 }],
152 'USE_EABI_HARDFLOAT=0', 179 ['mips_arch_variant=="loongson"', {
180 'cflags': ['-mips3', '-Wa,-mips3'],
181 }, {
182 'cflags': ['-mips32', '-Wa,-mips32'],
183 }],
153 ], 184 ],
154 }], 185 }],
155 ], 186 ],
156 }], 187 }],
157 ['v8_target_arch=="ia32"', { 188 [ 'v8_can_use_fpu_instructions=="true"', {
158 'defines': [ 189 'defines': [
159 'V8_TARGET_ARCH_IA32', 190 'CAN_USE_FPU_INSTRUCTIONS',
160 ], 191 ],
161 }], 192 }],
162 ['v8_target_arch=="mips"', { 193 [ 'v8_use_mips_abi_hardfloat=="true"', {
163 'defines': [ 194 'defines': [
164 'V8_TARGET_ARCH_MIPS', 195 '__mips_hard_float=1',
196 'CAN_USE_FPU_INSTRUCTIONS',
165 ], 197 ],
166 'variables': { 198 }, {
167 'mipscompiler': '<!($(echo ${CXX:-$(which g++)}) -v 2>&1 | grep -q "^Target: mips-" && echo "yes" || echo "no")', 199 'defines': [
168 }, 200 '__mips_soft_float=1'
169 'conditions': [
170 ['mipscompiler=="yes"', {
171 'target_conditions': [
172 ['_toolset=="target"', {
173 'cflags': ['-EL'],
174 'ldflags': ['-EL'],
175 'conditions': [
176 [ 'v8_use_mips_abi_hardfloat=="true"', {
177 'cflags': ['-mhard-float'],
178 'ldflags': ['-mhard-float'],
179 }, {
180 'cflags': ['-msoft-float'],
181 'ldflags': ['-msoft-float'],
182 }],
183 ['mips_arch_variant=="mips32r2"', {
184 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
185 }],
186 ['mips_arch_variant=="loongson"', {
187 'cflags': ['-mips3', '-Wa,-mips3'],
188 }, {
189 'cflags': ['-mips32', '-Wa,-mips32'],
190 }],
191 ],
192 }],
193 ],
194 }],
195 [ 'v8_can_use_fpu_instructions=="true"', {
196 'defines': [
197 'CAN_USE_FPU_INSTRUCTIONS',
198 ],
199 }],
200 [ 'v8_use_mips_abi_hardfloat=="true"', {
201 'defines': [
202 '__mips_hard_float=1',
203 'CAN_USE_FPU_INSTRUCTIONS',
204 ],
205 }, {
206 'defines': [
207 '__mips_soft_float=1'
208 ],
209 }],
210 ['mips_arch_variant=="mips32r2"', {
211 'defines': ['_MIPS_ARCH_MIPS32R2',],
212 }],
213 ['mips_arch_variant=="loongson"', {
214 'defines': ['_MIPS_ARCH_LOONGSON',],
215 }],
216 ], 201 ],
217 }], 202 }],
218 ['v8_target_arch=="x64"', { 203 ['mips_arch_variant=="mips32r2"', {
219 'defines': [ 204 'defines': ['_MIPS_ARCH_MIPS32R2',],
220 'V8_TARGET_ARCH_X64', 205 }],
221 ], 206 ['mips_arch_variant=="loongson"', {
207 'defines': ['_MIPS_ARCH_LOONGSON',],
222 }], 208 }],
223 ], 209 ],
224 }, { # Section for OS=="mac". 210 }], # v8_target_arch=="mips"
225 'conditions': [ 211 ['v8_target_arch=="x64"', {
226 ['target_arch=="ia32"', { 212 'defines': [
227 'xcode_settings': { 213 'V8_TARGET_ARCH_X64',
228 'ARCHS': ['i386'],
229 }
230 }],
231 ['target_arch=="x64"', {
232 'xcode_settings': {
233 'ARCHS': ['x86_64'],
234 }
235 }],
236 ], 214 ],
237 }], 215 'xcode_settings': {
216 'ARCHS': [ 'x86_64' ],
217 },
218 'msvs_settings': {
219 'VCLinkerTool': {
220 'StackReserveSize': '2097152',
221 },
222 },
223 }], # v8_target_arch=="x64"
238 ['v8_use_liveobjectlist=="true"', { 224 ['v8_use_liveobjectlist=="true"', {
239 'defines': [ 225 'defines': [
240 'ENABLE_DEBUGGER_SUPPORT', 226 'ENABLE_DEBUGGER_SUPPORT',
241 'INSPECTOR', 227 'INSPECTOR',
242 'OBJECT_PRINT', 228 'OBJECT_PRINT',
243 'LIVEOBJECTLIST', 229 'LIVEOBJECTLIST',
244 ], 230 ],
245 }], 231 }],
246 ['v8_compress_startup_data=="bz2"', { 232 ['v8_compress_startup_data=="bz2"', {
247 'defines': [ 233 'defines': [
248 'COMPRESS_STARTUP_DATA_BZ2', 234 'COMPRESS_STARTUP_DATA_BZ2',
249 ], 235 ],
250 }], 236 }],
251 ['OS=="win"', { 237 ['OS=="win"', {
252 'defines': [ 238 'defines': [
253 'WIN32', 239 'WIN32',
254 ], 240 ],
255 }], 241 }],
256 ['OS=="win" and v8_enable_prof==1', { 242 ['OS=="win" and v8_enable_prof==1', {
257 'msvs_settings': { 243 'msvs_settings': {
258 'VCLinkerTool': { 244 'VCLinkerTool': {
259 'GenerateMapFile': 'true', 245 'GenerateMapFile': 'true',
260 }, 246 },
261 }, 247 },
262 }], 248 }],
263 ['OS=="win" and v8_target_arch=="x64"', {
264 'msvs_settings': {
265 'VCLinkerTool': {
266 'StackReserveSize': '2097152',
267 },
268 },
269 }],
270 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ 249 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
271 or OS=="netbsd"', { 250 or OS=="netbsd"', {
272 'conditions': [ 251 'conditions': [
273 [ 'v8_no_strict_aliasing==1', { 252 [ 'v8_no_strict_aliasing==1', {
274 'cflags': [ '-fno-strict-aliasing' ], 253 'cflags': [ '-fno-strict-aliasing' ],
275 }], 254 }],
276 ], # conditions 255 ], # conditions
277 }], 256 }],
278 ['OS=="solaris"', { 257 ['OS=="solaris"', {
279 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. 258 'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
280 }], 259 }],
281 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ 260 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
282 or OS=="netbsd" or OS=="mac" or OS=="android") and \ 261 or OS=="netbsd" or OS=="mac" or OS=="android") and \
283 (v8_target_arch=="arm" or v8_target_arch=="ia32" or \ 262 (v8_target_arch=="arm" or v8_target_arch=="ia32" or \
284 v8_target_arch=="mips")', { 263 v8_target_arch=="mips")', {
285 # Check whether the host compiler and target compiler support the 264 # Check whether the host compiler and target compiler support the
286 # '-m32' option and set it if so. 265 # '-m32' option and set it if so.
287 'target_conditions': [ 266 'target_conditions': [
288 ['_toolset=="host"', { 267 ['_toolset=="host"', {
289 'variables': { 268 'variables': {
290 'm32flag': '<!((echo | $(echo ${CXX_host:-${CXX:-$(which g++)}}) - m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)', 269 'm32flag': '<!((echo | $(echo ${CXX_host:-${CXX:-$(which g++)}}) - m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)',
291 }, 270 },
292 'cflags': [ '<(m32flag)' ], 271 'cflags': [ '<(m32flag)' ],
293 'ldflags': [ '<(m32flag)' ], 272 'ldflags': [ '<(m32flag)' ],
273 'xcode_settings': {
274 'ARCHS': [ 'i386' ],
275 },
294 }], 276 }],
295 ['_toolset=="target"', { 277 ['_toolset=="target"', {
296 'variables': { 278 'variables': {
297 'm32flag': '<!((echo | $(echo ${CXX_target:-${CXX:-$(which g++)}}) -m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)', 279 'm32flag': '<!((echo | $(echo ${CXX_target:-${CXX:-$(which g++)}}) -m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)',
298 }, 280 },
299 'cflags': [ '<(m32flag)' ], 281 'cflags': [ '<(m32flag)' ],
300 'ldflags': [ '<(m32flag)' ], 282 'ldflags': [ '<(m32flag)' ],
283 'xcode_settings': {
284 'ARCHS': [ 'i386' ],
285 },
301 }], 286 }],
302 ], 287 ],
303 }], 288 }],
289 ['OS=="freebsd" or OS=="openbsd"', {
290 'cflags': [ '-I/usr/local/include' ],
291 }],
292 ['OS=="netbsd"', {
293 'cflags': [ '-I/usr/pkg/include' ],
294 }],
304 ], # conditions 295 ], # conditions
305 'configurations': { 296 'configurations': {
306 'Debug': { 297 'Debug': {
307 'defines': [ 298 'defines': [
308 'DEBUG', 299 'DEBUG',
309 'ENABLE_DISASSEMBLER', 300 'ENABLE_DISASSEMBLER',
310 'V8_ENABLE_CHECKS', 301 'V8_ENABLE_CHECKS',
311 'OBJECT_PRINT', 302 'OBJECT_PRINT',
312 ], 303 ],
313 'msvs_settings': { 304 'msvs_settings': {
314 'VCCLCompilerTool': { 305 'VCCLCompilerTool': {
315 'Optimization': '0', 306 'Optimization': '0',
316 307
317 'conditions': [ 308 'conditions': [
318 ['OS=="win" and component=="shared_library"', { 309 ['OS=="win" and component=="shared_library"', {
319 'RuntimeLibrary': '3', # /MDd 310 'RuntimeLibrary': '3', # /MDd
320 }, { 311 }, {
321 'RuntimeLibrary': '1', # /MTd 312 'RuntimeLibrary': '1', # /MTd
322 }], 313 }],
323 ], 314 ],
324 }, 315 },
325 'VCLinkerTool': { 316 'VCLinkerTool': {
326 'LinkIncremental': '2', 317 'LinkIncremental': '2',
327 }, 318 },
328 }, 319 },
329 'conditions': [ 320 'conditions': [
330 ['OS=="freebsd" or OS=="openbsd"', {
331 'cflags': [ '-I/usr/local/include' ],
332 }],
333 ['OS=="netbsd"', {
334 'cflags': [ '-I/usr/pkg/include' ],
335 }],
336 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { 321 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
337 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', 322 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
338 '-Wnon-virtual-dtor', '-Woverloaded-virtual' ], 323 '-Wnon-virtual-dtor', '-Woverloaded-virtual' ],
339 }], 324 }],
340 ], 325 ],
341 }, # Debug 326 }, # Debug
342 'Release': { 327 'Release': {
343 'conditions': [ 328 'conditions': [
344 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \ 329 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \
345 or OS=="android"', { 330 or OS=="android"', {
346 'cflags!': [ 331 'cflags!': [
347 '-O2', 332 '-O2',
348 '-Os', 333 '-Os',
349 ], 334 ],
350 'cflags': [ 335 'cflags': [
351 '-fdata-sections', 336 '-fdata-sections',
352 '-ffunction-sections', 337 '-ffunction-sections',
353 '-fomit-frame-pointer', 338 '-fomit-frame-pointer',
354 '-O3', 339 '-O3',
355 ], 340 ],
356 'conditions': [ 341 'conditions': [
357 [ 'gcc_version==44 and clang==0', { 342 [ 'gcc_version==44 and clang==0', {
358 'cflags': [ 343 'cflags': [
359 # Avoid crashes with gcc 4.4 in the v8 test suite. 344 # Avoid crashes with gcc 4.4 in the v8 test suite.
360 '-fno-tree-vrp', 345 '-fno-tree-vrp',
361 ], 346 ],
362 }], 347 }],
363 ], 348 ],
364 }], 349 }],
365 ['OS=="freebsd" or OS=="openbsd"', {
366 'cflags': [ '-I/usr/local/include' ],
367 }],
368 ['OS=="netbsd"', {
369 'cflags': [ '-I/usr/pkg/include' ],
370 }],
371 ['OS=="mac"', { 350 ['OS=="mac"', {
372 'xcode_settings': { 351 'xcode_settings': {
373 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 352 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
374 353
375 # -fstrict-aliasing. Mainline gcc 354 # -fstrict-aliasing. Mainline gcc
376 # enables this at -O2 and above, 355 # enables this at -O2 and above,
377 # but Apple gcc does not unless it 356 # but Apple gcc does not unless it
378 # is specified explicitly. 357 # is specified explicitly.
379 'GCC_STRICT_ALIASING': 'YES', 358 'GCC_STRICT_ALIASING': 'YES',
380 }, 359 },
(...skipping 26 matching lines...) Expand all
407 'OptimizeReferences': '2', 386 'OptimizeReferences': '2',
408 'EnableCOMDATFolding': '2', 387 'EnableCOMDATFolding': '2',
409 }, 388 },
410 }, 389 },
411 }], # OS=="win" 390 }], # OS=="win"
412 ], # conditions 391 ], # conditions
413 }, # Release 392 }, # Release
414 }, # configurations 393 }, # configurations
415 }, # target_defaults 394 }, # target_defaults
416 } 395 }
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