| OLD | NEW |
| 1 # Copyright 2010 the V8 project authors. All rights reserved. | 1 # Copyright 2010 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 }, | 227 }, |
| 228 'simulator:mips': { | 228 'simulator:mips': { |
| 229 'CCFLAGS': ['-m32'], | 229 'CCFLAGS': ['-m32'], |
| 230 'LINKFLAGS': ['-m32'], | 230 'LINKFLAGS': ['-m32'], |
| 231 }, | 231 }, |
| 232 'arch:x64': { | 232 'arch:x64': { |
| 233 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], | 233 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
| 234 'CCFLAGS': ['-m64'], | 234 'CCFLAGS': ['-m64'], |
| 235 'LINKFLAGS': ['-m64'], | 235 'LINKFLAGS': ['-m64'], |
| 236 }, | 236 }, |
| 237 'prof:oprofile': { | |
| 238 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] | |
| 239 }, | |
| 240 'gdbjit:on': { | 237 'gdbjit:on': { |
| 241 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] | 238 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] |
| 242 } | 239 } |
| 243 }, | 240 }, |
| 244 'msvc': { | 241 'msvc': { |
| 245 'all': { | 242 'all': { |
| 246 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 243 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 247 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], | 244 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], |
| 248 'CPPDEFINES': ['WIN32'], | 245 'CPPDEFINES': ['WIN32'], |
| 249 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], | 246 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 'CCFLAGS': ['-m32'], | 529 'CCFLAGS': ['-m32'], |
| 533 'LINKFLAGS': ['-m32'] | 530 'LINKFLAGS': ['-m32'] |
| 534 }, | 531 }, |
| 535 'mode:release': { | 532 'mode:release': { |
| 536 'CCFLAGS': ['-O2'] | 533 'CCFLAGS': ['-O2'] |
| 537 }, | 534 }, |
| 538 'mode:debug': { | 535 'mode:debug': { |
| 539 'CCFLAGS': ['-g', '-O0'], | 536 'CCFLAGS': ['-g', '-O0'], |
| 540 'CPPDEFINES': ['DEBUG'] | 537 'CPPDEFINES': ['DEBUG'] |
| 541 }, | 538 }, |
| 542 'prof:oprofile': { | |
| 543 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'], | |
| 544 'LIBS': ['opagent'] | |
| 545 } | |
| 546 }, | 539 }, |
| 547 'msvc': { | 540 'msvc': { |
| 548 'all': { | 541 'all': { |
| 549 'LIBS': ['winmm', 'ws2_32'] | 542 'LIBS': ['winmm', 'ws2_32'] |
| 550 }, | 543 }, |
| 551 'verbose:off': { | 544 'verbose:off': { |
| 552 'CCFLAGS': ['/nologo'], | 545 'CCFLAGS': ['/nologo'], |
| 553 'LINKFLAGS': ['/NOLOGO'] | 546 'LINKFLAGS': ['/NOLOGO'] |
| 554 }, | 547 }, |
| 555 'verbose:on': { | 548 'verbose:on': { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 tools = Environment()['TOOLS'] | 656 tools = Environment()['TOOLS'] |
| 664 if 'gcc' in tools: | 657 if 'gcc' in tools: |
| 665 return 'gcc' | 658 return 'gcc' |
| 666 elif 'msvc' in tools: | 659 elif 'msvc' in tools: |
| 667 return 'msvc' | 660 return 'msvc' |
| 668 else: | 661 else: |
| 669 return None | 662 return None |
| 670 | 663 |
| 671 | 664 |
| 672 def GuessVisibility(os, toolchain): | 665 def GuessVisibility(os, toolchain): |
| 673 if os == 'win32' and toolchain == 'gcc': | 666 if (os == 'win32' or os == 'cygwin') and toolchain == 'gcc': |
| 674 # MinGW can't do it. | 667 # MinGW / Cygwin can't do it. |
| 675 return 'default' | 668 return 'default' |
| 676 elif os == 'solaris': | 669 elif os == 'solaris': |
| 677 return 'default' | 670 return 'default' |
| 678 else: | 671 else: |
| 679 return 'hidden' | 672 return 'hidden' |
| 680 | 673 |
| 681 | 674 |
| 682 OS_GUESS = utils.GuessOS() | 675 OS_GUESS = utils.GuessOS() |
| 683 TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) | 676 TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) |
| 684 ARCH_GUESS = utils.GuessArchitecture() | 677 ARCH_GUESS = utils.GuessArchitecture() |
| 685 VISIBILITY_GUESS = GuessVisibility(OS_GUESS, TOOLCHAIN_GUESS) | 678 VISIBILITY_GUESS = GuessVisibility(OS_GUESS, TOOLCHAIN_GUESS) |
| 686 | 679 |
| 687 | 680 |
| 688 SIMPLE_OPTIONS = { | 681 SIMPLE_OPTIONS = { |
| 689 'toolchain': { | 682 'toolchain': { |
| 690 'values': ['gcc', 'msvc'], | 683 'values': ['gcc', 'msvc'], |
| 691 'default': TOOLCHAIN_GUESS, | 684 'default': TOOLCHAIN_GUESS, |
| 692 'help': 'the toolchain to use (%s)' % TOOLCHAIN_GUESS | 685 'help': 'the toolchain to use (%s)' % TOOLCHAIN_GUESS |
| 693 }, | 686 }, |
| 694 'os': { | 687 'os': { |
| 695 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'sola
ris'], | 688 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'sola
ris', 'cygwin'], |
| 696 'default': OS_GUESS, | 689 'default': OS_GUESS, |
| 697 'help': 'the os to build for (%s)' % OS_GUESS | 690 'help': 'the os to build for (%s)' % OS_GUESS |
| 698 }, | 691 }, |
| 699 'arch': { | 692 'arch': { |
| 700 'values':['arm', 'ia32', 'x64', 'mips'], | 693 'values':['arm', 'ia32', 'x64', 'mips'], |
| 701 'default': ARCH_GUESS, | 694 'default': ARCH_GUESS, |
| 702 'help': 'the architecture to build for (%s)' % ARCH_GUESS | 695 'help': 'the architecture to build for (%s)' % ARCH_GUESS |
| 703 }, | 696 }, |
| 704 'regexp': { | 697 'regexp': { |
| 705 'values': ['native', 'interpreted'], | 698 'values': ['native', 'interpreted'], |
| 706 'default': 'native', | 699 'default': 'native', |
| 707 'help': 'Whether to use native or interpreted regexp implementation' | 700 'help': 'Whether to use native or interpreted regexp implementation' |
| 708 }, | 701 }, |
| 709 'snapshot': { | 702 'snapshot': { |
| 710 'values': ['on', 'off', 'nobuild'], | 703 'values': ['on', 'off', 'nobuild'], |
| 711 'default': 'off', | 704 'default': 'off', |
| 712 'help': 'build using snapshots for faster start-up' | 705 'help': 'build using snapshots for faster start-up' |
| 713 }, | 706 }, |
| 714 'prof': { | 707 'prof': { |
| 715 'values': ['on', 'off', 'oprofile'], | 708 'values': ['on', 'off'], |
| 716 'default': 'off', | 709 'default': 'off', |
| 717 'help': 'enable profiling of build target' | 710 'help': 'enable profiling of build target' |
| 718 }, | 711 }, |
| 719 'gdbjit': { | 712 'gdbjit': { |
| 720 'values': ['on', 'off'], | 713 'values': ['on', 'off'], |
| 721 'default': 'off', | 714 'default': 'off', |
| 722 'help': 'enable GDB JIT interface' | 715 'help': 'enable GDB JIT interface' |
| 723 }, | 716 }, |
| 724 'library': { | 717 'library': { |
| 725 'values': ['static', 'shared'], | 718 'values': ['static', 'shared'], |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 | 883 |
| 891 def VerifyOptions(env): | 884 def VerifyOptions(env): |
| 892 if not IsLegal(env, 'mode', ['debug', 'release']): | 885 if not IsLegal(env, 'mode', ['debug', 'release']): |
| 893 return False | 886 return False |
| 894 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): | 887 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): |
| 895 return False | 888 return False |
| 896 if not IsLegal(env, 'regexp', ["native", "interpreted"]): | 889 if not IsLegal(env, 'regexp', ["native", "interpreted"]): |
| 897 return False | 890 return False |
| 898 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on'
: | 891 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on'
: |
| 899 Abort("Profiling on windows only supported for static library.") | 892 Abort("Profiling on windows only supported for static library.") |
| 900 if env['gdbjit'] == 'on' and (env['os'] != 'linux' or (env['arch'] != 'ia32' a
nd env['arch'] != 'x64')): | 893 if env['gdbjit'] == 'on' and (env['os'] != 'linux' or (env['arch'] != 'ia32' a
nd env['arch'] != 'x64' and env['arch'] != 'arm')): |
| 901 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64)
Linux target.") | 894 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64)
Linux target.") |
| 902 if env['prof'] == 'oprofile' and env['os'] != 'linux': | |
| 903 Abort("OProfile is only supported on Linux.") | |
| 904 if env['os'] == 'win32' and env['soname'] == 'on': | 895 if env['os'] == 'win32' and env['soname'] == 'on': |
| 905 Abort("Shared Object soname not applicable for Windows.") | 896 Abort("Shared Object soname not applicable for Windows.") |
| 906 if env['soname'] == 'on' and env['library'] == 'static': | 897 if env['soname'] == 'on' and env['library'] == 'static': |
| 907 Abort("Shared Object soname not applicable for static library.") | 898 Abort("Shared Object soname not applicable for static library.") |
| 908 if env['os'] != 'win32' and env['pgo'] != 'off': | 899 if env['os'] != 'win32' and env['pgo'] != 'off': |
| 909 Abort("Profile guided optimization only supported on Windows.") | 900 Abort("Profile guided optimization only supported on Windows.") |
| 910 if env['cache'] and not os.path.isdir(env['cache']): | 901 if env['cache'] and not os.path.isdir(env['cache']): |
| 911 Abort("The specified cache directory does not exist.") | 902 Abort("The specified cache directory does not exist.") |
| 912 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce
sses' in ARGUMENTS): | 903 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce
sses' in ARGUMENTS): |
| 913 print env['arch'] | 904 print env['arch'] |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 # version of scons. Also, there's a bug in some revisions that | 1183 # version of scons. Also, there's a bug in some revisions that |
| 1193 # doesn't allow this flag to be set, so we swallow any exceptions. | 1184 # doesn't allow this flag to be set, so we swallow any exceptions. |
| 1194 # Lovely. | 1185 # Lovely. |
| 1195 try: | 1186 try: |
| 1196 SetOption('warn', 'no-deprecated') | 1187 SetOption('warn', 'no-deprecated') |
| 1197 except: | 1188 except: |
| 1198 pass | 1189 pass |
| 1199 | 1190 |
| 1200 | 1191 |
| 1201 Build() | 1192 Build() |
| OLD | NEW |