| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 'simulator:arm': { | 184 'simulator:arm': { |
| 185 'CCFLAGS': ['-m32'], | 185 'CCFLAGS': ['-m32'], |
| 186 'LINKFLAGS': ['-m32'] | 186 'LINKFLAGS': ['-m32'] |
| 187 }, | 187 }, |
| 188 'armvariant:thumb2': { | 188 'armvariant:thumb2': { |
| 189 'CPPDEFINES': ['V8_ARM_VARIANT_THUMB'] | 189 'CPPDEFINES': ['V8_ARM_VARIANT_THUMB'] |
| 190 }, | 190 }, |
| 191 'armvariant:arm': { | 191 'armvariant:arm': { |
| 192 'CPPDEFINES': ['V8_ARM_VARIANT_ARM'] | 192 'CPPDEFINES': ['V8_ARM_VARIANT_ARM'] |
| 193 }, | 193 }, |
| 194 'arch:mips': { |
| 195 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], |
| 196 'simulator:none': { |
| 197 'CCFLAGS': ['-EL', '-mips32r2', '-Wa,-mips32r2', '-fno-inline'], |
| 198 'LDFLAGS': ['-EL'] |
| 199 } |
| 200 }, |
| 201 'simulator:mips': { |
| 202 'CCFLAGS': ['-m32'], |
| 203 'LINKFLAGS': ['-m32'] |
| 204 }, |
| 194 'arch:x64': { | 205 'arch:x64': { |
| 195 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], | 206 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
| 196 'CCFLAGS': ['-m64'], | 207 'CCFLAGS': ['-m64'], |
| 197 'LINKFLAGS': ['-m64'], | 208 'LINKFLAGS': ['-m64'], |
| 198 }, | 209 }, |
| 199 'prof:oprofile': { | 210 'prof:oprofile': { |
| 200 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] | 211 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] |
| 201 } | 212 } |
| 202 }, | 213 }, |
| 203 'msvc': { | 214 'msvc': { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 'library:shared': { | 297 'library:shared': { |
| 287 'CPPDEFINES': ['BUILDING_V8_SHARED'], | 298 'CPPDEFINES': ['BUILDING_V8_SHARED'], |
| 288 'LIBS': ['winmm', 'ws2_32'] | 299 'LIBS': ['winmm', 'ws2_32'] |
| 289 }, | 300 }, |
| 290 'arch:arm': { | 301 'arch:arm': { |
| 291 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], | 302 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], |
| 292 # /wd4996 is to silence the warning about sscanf | 303 # /wd4996 is to silence the warning about sscanf |
| 293 # used by the arm simulator. | 304 # used by the arm simulator. |
| 294 'WARNINGFLAGS': ['/wd4996'] | 305 'WARNINGFLAGS': ['/wd4996'] |
| 295 }, | 306 }, |
| 307 'arch:mips': { |
| 308 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], |
| 309 }, |
| 296 'disassembler:on': { | 310 'disassembler:on': { |
| 297 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] | 311 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] |
| 298 } | 312 } |
| 299 } | 313 } |
| 300 } | 314 } |
| 301 | 315 |
| 302 | 316 |
| 303 MKSNAPSHOT_EXTRA_FLAGS = { | 317 MKSNAPSHOT_EXTRA_FLAGS = { |
| 304 'gcc': { | 318 'gcc': { |
| 305 'os:linux': { | 319 'os:linux': { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 } | 465 } |
| 452 }, | 466 }, |
| 453 'arch:ia32': { | 467 'arch:ia32': { |
| 454 'CCFLAGS': ['-m32'], | 468 'CCFLAGS': ['-m32'], |
| 455 'LINKFLAGS': ['-m32'] | 469 'LINKFLAGS': ['-m32'] |
| 456 }, | 470 }, |
| 457 'arch:x64': { | 471 'arch:x64': { |
| 458 'CCFLAGS': ['-m64'], | 472 'CCFLAGS': ['-m64'], |
| 459 'LINKFLAGS': ['-m64'] | 473 'LINKFLAGS': ['-m64'] |
| 460 }, | 474 }, |
| 475 'arch:mips': { |
| 476 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], |
| 477 'simulator:none': { |
| 478 'CCFLAGS': ['-EL', '-mips32r2', '-Wa,-mips32r2', '-fno-inline'], |
| 479 'LINKFLAGS': ['-EL'], |
| 480 'LDFLAGS': ['-EL'] |
| 481 } |
| 482 }, |
| 461 'simulator:arm': { | 483 'simulator:arm': { |
| 462 'CCFLAGS': ['-m32'], | 484 'CCFLAGS': ['-m32'], |
| 463 'LINKFLAGS': ['-m32'] | 485 'LINKFLAGS': ['-m32'] |
| 464 }, | 486 }, |
| 487 'simulator:mips': { |
| 488 'CCFLAGS': ['-m32'], |
| 489 'LINKFLAGS': ['-m32'] |
| 490 }, |
| 465 'mode:release': { | 491 'mode:release': { |
| 466 'CCFLAGS': ['-O2'] | 492 'CCFLAGS': ['-O2'] |
| 467 }, | 493 }, |
| 468 'mode:debug': { | 494 'mode:debug': { |
| 469 'CCFLAGS': ['-g', '-O0'] | 495 'CCFLAGS': ['-g', '-O0'] |
| 470 }, | 496 }, |
| 471 'prof:oprofile': { | 497 'prof:oprofile': { |
| 472 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'], | 498 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'], |
| 473 'LIBS': ['opagent'] | 499 'LIBS': ['opagent'] |
| 474 } | 500 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 'values': ['gcc', 'msvc'], | 621 'values': ['gcc', 'msvc'], |
| 596 'default': TOOLCHAIN_GUESS, | 622 'default': TOOLCHAIN_GUESS, |
| 597 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')' | 623 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')' |
| 598 }, | 624 }, |
| 599 'os': { | 625 'os': { |
| 600 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'sola
ris'], | 626 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'sola
ris'], |
| 601 'default': OS_GUESS, | 627 'default': OS_GUESS, |
| 602 'help': 'the os to build for (' + OS_GUESS + ')' | 628 'help': 'the os to build for (' + OS_GUESS + ')' |
| 603 }, | 629 }, |
| 604 'arch': { | 630 'arch': { |
| 605 'values':['arm', 'ia32', 'x64'], | 631 'values':['arm', 'ia32', 'x64', 'mips'], |
| 606 'default': ARCH_GUESS, | 632 'default': ARCH_GUESS, |
| 607 'help': 'the architecture to build for (' + ARCH_GUESS + ')' | 633 'help': 'the architecture to build for (' + ARCH_GUESS + ')' |
| 608 }, | 634 }, |
| 609 'regexp': { | 635 'regexp': { |
| 610 'values': ['native', 'interpreted'], | 636 'values': ['native', 'interpreted'], |
| 611 'default': 'native', | 637 'default': 'native', |
| 612 'help': 'Whether to use native or interpreted regexp implementation' | 638 'help': 'Whether to use native or interpreted regexp implementation' |
| 613 }, | 639 }, |
| 614 'snapshot': { | 640 'snapshot': { |
| 615 'values': ['on', 'off', 'nobuild'], | 641 'values': ['on', 'off', 'nobuild'], |
| (...skipping 29 matching lines...) Expand all Loading... |
| 645 'values': ['static', 'shared'], | 671 'values': ['static', 'shared'], |
| 646 'default': 'static', | 672 'default': 'static', |
| 647 'help': 'the type of Microsoft Visual C++ runtime library to use' | 673 'help': 'the type of Microsoft Visual C++ runtime library to use' |
| 648 }, | 674 }, |
| 649 'msvcltcg': { | 675 'msvcltcg': { |
| 650 'values': ['on', 'off'], | 676 'values': ['on', 'off'], |
| 651 'default': 'on', | 677 'default': 'on', |
| 652 'help': 'use Microsoft Visual C++ link-time code generation' | 678 'help': 'use Microsoft Visual C++ link-time code generation' |
| 653 }, | 679 }, |
| 654 'simulator': { | 680 'simulator': { |
| 655 'values': ['arm', 'none'], | 681 'values': ['arm', 'mips', 'none'], |
| 656 'default': 'none', | 682 'default': 'none', |
| 657 'help': 'build with simulator' | 683 'help': 'build with simulator' |
| 658 }, | 684 }, |
| 659 'disassembler': { | 685 'disassembler': { |
| 660 'values': ['on', 'off'], | 686 'values': ['on', 'off'], |
| 661 'default': 'off', | 687 'default': 'off', |
| 662 'help': 'enable the disassembler to inspect generated code' | 688 'help': 'enable the disassembler to inspect generated code' |
| 663 }, | 689 }, |
| 664 'sourcesignatures': { | 690 'sourcesignatures': { |
| 665 'values': ['MD5', 'timestamp'], | 691 'values': ['MD5', 'timestamp'], |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 print "Warning: forcing architecture to match simulator (%s)" % options['s
imulator'] | 891 print "Warning: forcing architecture to match simulator (%s)" % options['s
imulator'] |
| 866 options['arch'] = options['simulator'] | 892 options['arch'] = options['simulator'] |
| 867 if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'): | 893 if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'): |
| 868 # Print a warning if profiling is enabled without profiling support | 894 # Print a warning if profiling is enabled without profiling support |
| 869 print "Warning: forcing profilingsupport on when prof is on" | 895 print "Warning: forcing profilingsupport on when prof is on" |
| 870 options['profilingsupport'] = 'on' | 896 options['profilingsupport'] = 'on' |
| 871 if (options['armvariant'] == 'none' and options['arch'] == 'arm'): | 897 if (options['armvariant'] == 'none' and options['arch'] == 'arm'): |
| 872 options['armvariant'] = 'arm' | 898 options['armvariant'] = 'arm' |
| 873 if (options['armvariant'] != 'none' and options['arch'] != 'arm'): | 899 if (options['armvariant'] != 'none' and options['arch'] != 'arm'): |
| 874 options['armvariant'] = 'none' | 900 options['armvariant'] = 'none' |
| 901 if options['arch'] == 'mips': |
| 902 if ('regexp' in ARGUMENTS) and options['regexp'] == 'native': |
| 903 # Print a warning if native regexp is specified for mips |
| 904 print "Warning: forcing regexp to interpreted for mips" |
| 905 options['regexp'] = 'interpreted' |
| 875 | 906 |
| 876 | 907 |
| 877 def ParseEnvOverrides(arg, imports): | 908 def ParseEnvOverrides(arg, imports): |
| 878 # The environment overrides are in the format NAME0:value0,NAME1:value1,... | 909 # The environment overrides are in the format NAME0:value0,NAME1:value1,... |
| 879 # The environment imports are in the format NAME0,NAME1,... | 910 # The environment imports are in the format NAME0,NAME1,... |
| 880 overrides = {} | 911 overrides = {} |
| 881 for var in imports.split(','): | 912 for var in imports.split(','): |
| 882 if var in os.environ: | 913 if var in os.environ: |
| 883 overrides[var] = os.environ[var] | 914 overrides[var] = os.environ[var] |
| 884 for override in arg.split(','): | 915 for override in arg.split(','): |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 # version of scons. Also, there's a bug in some revisions that | 1066 # version of scons. Also, there's a bug in some revisions that |
| 1036 # doesn't allow this flag to be set, so we swallow any exceptions. | 1067 # doesn't allow this flag to be set, so we swallow any exceptions. |
| 1037 # Lovely. | 1068 # Lovely. |
| 1038 try: | 1069 try: |
| 1039 SetOption('warn', 'no-deprecated') | 1070 SetOption('warn', 'no-deprecated') |
| 1040 except: | 1071 except: |
| 1041 pass | 1072 pass |
| 1042 | 1073 |
| 1043 | 1074 |
| 1044 Build() | 1075 Build() |
| OLD | NEW |