OLD | NEW |
1 # Copyright 2008 the V8 project authors. All rights reserved. | 1 # Copyright 2008 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 'CXXFLAGS': ['-DWIN32'], | 142 'CXXFLAGS': ['-DWIN32'], |
143 }, | 143 }, |
144 'os:android': { | 144 'os:android': { |
145 'CPPDEFINES': ['ANDROID', '__ARM_ARCH_5__', '__ARM_ARCH_5T__', | 145 'CPPDEFINES': ['ANDROID', '__ARM_ARCH_5__', '__ARM_ARCH_5T__', |
146 '__ARM_ARCH_5E__', '__ARM_ARCH_5TE__'], | 146 '__ARM_ARCH_5E__', '__ARM_ARCH_5TE__'], |
147 'CCFLAGS': ANDROID_FLAGS, | 147 'CCFLAGS': ANDROID_FLAGS, |
148 'WARNINGFLAGS': ['-Wall', '-Wno-unused', '-Werror=return-type', | 148 'WARNINGFLAGS': ['-Wall', '-Wno-unused', '-Werror=return-type', |
149 '-Wstrict-aliasing=2'], | 149 '-Wstrict-aliasing=2'], |
150 'CPPPATH': ANDROID_INCLUDES, | 150 'CPPPATH': ANDROID_INCLUDES, |
151 }, | 151 }, |
152 'wordsize:32': { | |
153 'arch:x64': { | |
154 'CCFLAGS': ['-m64'], | |
155 'LINKFLAGS': ['-m64'] | |
156 } | |
157 }, | |
158 'wordsize:64': { | |
159 'arch:ia32': { | |
160 'CCFLAGS': ['-m32'], | |
161 'LINKFLAGS': ['-m32'] | |
162 }, | |
163 'arch:arm': { | |
164 'CCFLAGS': ['-m32'], | |
165 'LINKFLAGS': ['-m32'] | |
166 } | |
167 }, | |
168 'arch:ia32': { | 152 'arch:ia32': { |
169 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'] | 153 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'], |
| 154 'CCFLAGS': ['-m32'], |
| 155 'LINKFLAGS': ['-m32'] |
170 }, | 156 }, |
171 'arch:arm': { | 157 'arch:arm': { |
172 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'] | 158 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'] |
173 }, | 159 }, |
| 160 'simulator:arm': { |
| 161 'CCFLAGS': ['-m32'], |
| 162 'LINKFLAGS': ['-m32'] |
| 163 }, |
174 'arch:x64': { | 164 'arch:x64': { |
175 'CCFLAGS': ['-fno-strict-aliasing'], | 165 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
176 'CPPDEFINES': ['V8_TARGET_ARCH_X64'] | 166 'CCFLAGS': ['-fno-strict-aliasing', '-m64'], |
| 167 'LINKFLAGS': ['-m64'], |
177 }, | 168 }, |
178 'prof:oprofile': { | 169 'prof:oprofile': { |
179 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] | 170 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] |
180 } | 171 } |
181 }, | 172 }, |
182 'msvc': { | 173 'msvc': { |
183 'all': { | 174 'all': { |
184 'DIALECTFLAGS': ['/nologo'], | 175 'DIALECTFLAGS': ['/nologo'], |
185 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 176 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
186 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], | 177 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 '__ARM_ARCH_5E__', '__ARM_ARCH_5TE__'], | 325 '__ARM_ARCH_5E__', '__ARM_ARCH_5TE__'], |
335 'CCFLAGS': ANDROID_FLAGS, | 326 'CCFLAGS': ANDROID_FLAGS, |
336 'CPPPATH': ANDROID_INCLUDES, | 327 'CPPPATH': ANDROID_INCLUDES, |
337 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'], | 328 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'], |
338 'LINKFLAGS': ANDROID_LINKFLAGS, | 329 'LINKFLAGS': ANDROID_LINKFLAGS, |
339 'LIBS': ['c', 'stdc++', 'm'], | 330 'LIBS': ['c', 'stdc++', 'm'], |
340 'mode:release': { | 331 'mode:release': { |
341 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] | 332 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] |
342 } | 333 } |
343 }, | 334 }, |
344 'wordsize:32': { | |
345 'arch:x64': { | |
346 'CCFLAGS': ['-m64'], | |
347 'LINKFLAGS': ['-m64'] | |
348 } | |
349 }, | |
350 'wordsize:64': { | |
351 'arch:ia32': { | |
352 'CCFLAGS': ['-m32'], | |
353 'LINKFLAGS': ['-m32'] | |
354 }, | |
355 'arch:arm': { | |
356 'CCFLAGS': ['-m32'], | |
357 'LINKFLAGS': ['-m32'] | |
358 } | |
359 } | |
360 }, | 335 }, |
361 'msvc': { | 336 'msvc': { |
362 'all': { | 337 'all': { |
363 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], | 338 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], |
364 'LIBS': ['winmm', 'ws2_32'] | 339 'LIBS': ['winmm', 'ws2_32'] |
365 }, | 340 }, |
366 'library:shared': { | 341 'library:shared': { |
367 'CPPDEFINES': ['USING_V8_SHARED'] | 342 'CPPDEFINES': ['USING_V8_SHARED'] |
368 }, | 343 }, |
369 'arch:ia32': { | 344 'arch:ia32': { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 '__ARM_ARCH_5E__', '__ARM_ARCH_5TE__'], | 376 '__ARM_ARCH_5E__', '__ARM_ARCH_5TE__'], |
402 'CCFLAGS': ANDROID_FLAGS, | 377 'CCFLAGS': ANDROID_FLAGS, |
403 'CPPPATH': ANDROID_INCLUDES, | 378 'CPPPATH': ANDROID_INCLUDES, |
404 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'], | 379 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'], |
405 'LINKFLAGS': ANDROID_LINKFLAGS, | 380 'LINKFLAGS': ANDROID_LINKFLAGS, |
406 'LIBS': ['c', 'stdc++', 'm'], | 381 'LIBS': ['c', 'stdc++', 'm'], |
407 'mode:release': { | 382 'mode:release': { |
408 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] | 383 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] |
409 } | 384 } |
410 }, | 385 }, |
411 'wordsize:32': { | 386 'arch:ia32': { |
412 'arch:x64': { | 387 'CCFLAGS': ['-m32'], |
413 'CCFLAGS': ['-m64'], | 388 'LINKFLAGS': ['-m32'] |
414 'LINKFLAGS': ['-m64'] | |
415 } | |
416 }, | 389 }, |
417 'wordsize:64': { | 390 'arch:x64': { |
418 'arch:ia32': { | 391 'CCFLAGS': ['-m64'], |
419 'CCFLAGS': ['-m32'], | 392 'LINKFLAGS': ['-m64'] |
420 'LINKFLAGS': ['-m32'] | 393 }, |
421 }, | 394 'simulator:arm': { |
422 'arch:arm': { | 395 'CCFLAGS': ['-m32'], |
423 'CCFLAGS': ['-m32'], | 396 'LINKFLAGS': ['-m32'] |
424 'LINKFLAGS': ['-m32'] | |
425 } | |
426 }, | 397 }, |
427 'mode:release': { | 398 'mode:release': { |
428 'CCFLAGS': ['-O2'] | 399 'CCFLAGS': ['-O2'] |
429 }, | 400 }, |
430 'mode:debug': { | 401 'mode:debug': { |
431 'CCFLAGS': ['-g', '-O0'] | 402 'CCFLAGS': ['-g', '-O0'] |
432 }, | 403 }, |
433 'prof:oprofile': { | 404 'prof:oprofile': { |
434 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'], | 405 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'], |
435 'LIBS': ['opagent'] | 406 'LIBS': ['opagent'] |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 return 'gcc' | 497 return 'gcc' |
527 elif 'msvc' in tools: | 498 elif 'msvc' in tools: |
528 return 'msvc' | 499 return 'msvc' |
529 else: | 500 else: |
530 return None | 501 return None |
531 | 502 |
532 | 503 |
533 OS_GUESS = utils.GuessOS() | 504 OS_GUESS = utils.GuessOS() |
534 TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) | 505 TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) |
535 ARCH_GUESS = utils.GuessArchitecture() | 506 ARCH_GUESS = utils.GuessArchitecture() |
536 WORDSIZE_GUESS = utils.GuessWordsize() | |
537 | 507 |
538 | 508 |
539 SIMPLE_OPTIONS = { | 509 SIMPLE_OPTIONS = { |
540 'toolchain': { | 510 'toolchain': { |
541 'values': ['gcc', 'msvc'], | 511 'values': ['gcc', 'msvc'], |
542 'default': TOOLCHAIN_GUESS, | 512 'default': TOOLCHAIN_GUESS, |
543 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')' | 513 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')' |
544 }, | 514 }, |
545 'os': { | 515 'os': { |
546 'values': ['freebsd', 'linux', 'macos', 'win32', 'android'], | 516 'values': ['freebsd', 'linux', 'macos', 'win32', 'android'], |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 'msvcrt': { | 550 'msvcrt': { |
581 'values': ['static', 'shared'], | 551 'values': ['static', 'shared'], |
582 'default': 'static', | 552 'default': 'static', |
583 'help': 'the type of Microsoft Visual C++ runtime library to use' | 553 'help': 'the type of Microsoft Visual C++ runtime library to use' |
584 }, | 554 }, |
585 'msvcltcg': { | 555 'msvcltcg': { |
586 'values': ['on', 'off'], | 556 'values': ['on', 'off'], |
587 'default': 'on', | 557 'default': 'on', |
588 'help': 'use Microsoft Visual C++ link-time code generation' | 558 'help': 'use Microsoft Visual C++ link-time code generation' |
589 }, | 559 }, |
590 'wordsize': { | |
591 'values': ['64', '32'], | |
592 'default': WORDSIZE_GUESS, | |
593 'help': 'the word size' | |
594 }, | |
595 'simulator': { | 560 'simulator': { |
596 'values': ['arm', 'none'], | 561 'values': ['arm', 'none'], |
597 'default': 'none', | 562 'default': 'none', |
598 'help': 'build with simulator' | 563 'help': 'build with simulator' |
599 }, | 564 }, |
600 'disassembler': { | 565 'disassembler': { |
601 'values': ['on', 'off'], | 566 'values': ['on', 'off'], |
602 'default': 'off', | 567 'default': 'off', |
603 'help': 'enable the disassembler to inspect generated code' | 568 'help': 'enable the disassembler to inspect generated code' |
604 }, | 569 }, |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 # version of scons. Also, there's a bug in some revisions that | 904 # version of scons. Also, there's a bug in some revisions that |
940 # doesn't allow this flag to be set, so we swallow any exceptions. | 905 # doesn't allow this flag to be set, so we swallow any exceptions. |
941 # Lovely. | 906 # Lovely. |
942 try: | 907 try: |
943 SetOption('warn', 'no-deprecated') | 908 SetOption('warn', 'no-deprecated') |
944 except: | 909 except: |
945 pass | 910 pass |
946 | 911 |
947 | 912 |
948 Build() | 913 Build() |
OLD | NEW |