| 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 tools = Environment()['TOOLS'] | 656 tools = Environment()['TOOLS'] |
| 657 if 'gcc' in tools: | 657 if 'gcc' in tools: |
| 658 return 'gcc' | 658 return 'gcc' |
| 659 elif 'msvc' in tools: | 659 elif 'msvc' in tools: |
| 660 return 'msvc' | 660 return 'msvc' |
| 661 else: | 661 else: |
| 662 return None | 662 return None |
| 663 | 663 |
| 664 | 664 |
| 665 def GuessVisibility(os, toolchain): | 665 def GuessVisibility(os, toolchain): |
| 666 if os == 'win32' and toolchain == 'gcc': | 666 if (os == 'win32' or os == 'cygwin') and toolchain == 'gcc': |
| 667 # MinGW can't do it. | 667 # MinGW / Cygwin can't do it. |
| 668 return 'default' | 668 return 'default' |
| 669 elif os == 'solaris': | 669 elif os == 'solaris': |
| 670 return 'default' | 670 return 'default' |
| 671 else: | 671 else: |
| 672 return 'hidden' | 672 return 'hidden' |
| 673 | 673 |
| 674 | 674 |
| 675 OS_GUESS = utils.GuessOS() | 675 OS_GUESS = utils.GuessOS() |
| 676 TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) | 676 TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) |
| 677 ARCH_GUESS = utils.GuessArchitecture() | 677 ARCH_GUESS = utils.GuessArchitecture() |
| 678 VISIBILITY_GUESS = GuessVisibility(OS_GUESS, TOOLCHAIN_GUESS) | 678 VISIBILITY_GUESS = GuessVisibility(OS_GUESS, TOOLCHAIN_GUESS) |
| 679 | 679 |
| 680 | 680 |
| 681 SIMPLE_OPTIONS = { | 681 SIMPLE_OPTIONS = { |
| 682 'toolchain': { | 682 'toolchain': { |
| 683 'values': ['gcc', 'msvc'], | 683 'values': ['gcc', 'msvc'], |
| 684 'default': TOOLCHAIN_GUESS, | 684 'default': TOOLCHAIN_GUESS, |
| 685 'help': 'the toolchain to use (%s)' % TOOLCHAIN_GUESS | 685 'help': 'the toolchain to use (%s)' % TOOLCHAIN_GUESS |
| 686 }, | 686 }, |
| 687 'os': { | 687 'os': { |
| 688 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'sola
ris'], | 688 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'sola
ris', 'cygwin'], |
| 689 'default': OS_GUESS, | 689 'default': OS_GUESS, |
| 690 'help': 'the os to build for (%s)' % OS_GUESS | 690 'help': 'the os to build for (%s)' % OS_GUESS |
| 691 }, | 691 }, |
| 692 'arch': { | 692 'arch': { |
| 693 'values':['arm', 'ia32', 'x64', 'mips'], | 693 'values':['arm', 'ia32', 'x64', 'mips'], |
| 694 'default': ARCH_GUESS, | 694 'default': ARCH_GUESS, |
| 695 'help': 'the architecture to build for (%s)' % ARCH_GUESS | 695 'help': 'the architecture to build for (%s)' % ARCH_GUESS |
| 696 }, | 696 }, |
| 697 'regexp': { | 697 'regexp': { |
| 698 'values': ['native', 'interpreted'], | 698 'values': ['native', 'interpreted'], |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 | 883 |
| 884 def VerifyOptions(env): | 884 def VerifyOptions(env): |
| 885 if not IsLegal(env, 'mode', ['debug', 'release']): | 885 if not IsLegal(env, 'mode', ['debug', 'release']): |
| 886 return False | 886 return False |
| 887 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): | 887 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): |
| 888 return False | 888 return False |
| 889 if not IsLegal(env, 'regexp', ["native", "interpreted"]): | 889 if not IsLegal(env, 'regexp', ["native", "interpreted"]): |
| 890 return False | 890 return False |
| 891 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'
: |
| 892 Abort("Profiling on windows only supported for static library.") | 892 Abort("Profiling on windows only supported for static library.") |
| 893 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')): |
| 894 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.") |
| 895 if env['os'] == 'win32' and env['soname'] == 'on': | 895 if env['os'] == 'win32' and env['soname'] == 'on': |
| 896 Abort("Shared Object soname not applicable for Windows.") | 896 Abort("Shared Object soname not applicable for Windows.") |
| 897 if env['soname'] == 'on' and env['library'] == 'static': | 897 if env['soname'] == 'on' and env['library'] == 'static': |
| 898 Abort("Shared Object soname not applicable for static library.") | 898 Abort("Shared Object soname not applicable for static library.") |
| 899 if env['os'] != 'win32' and env['pgo'] != 'off': | 899 if env['os'] != 'win32' and env['pgo'] != 'off': |
| 900 Abort("Profile guided optimization only supported on Windows.") | 900 Abort("Profile guided optimization only supported on Windows.") |
| 901 if env['cache'] and not os.path.isdir(env['cache']): | 901 if env['cache'] and not os.path.isdir(env['cache']): |
| 902 Abort("The specified cache directory does not exist.") | 902 Abort("The specified cache directory does not exist.") |
| 903 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): |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 # 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 |
| 1184 # 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. |
| 1185 # Lovely. | 1185 # Lovely. |
| 1186 try: | 1186 try: |
| 1187 SetOption('warn', 'no-deprecated') | 1187 SetOption('warn', 'no-deprecated') |
| 1188 except: | 1188 except: |
| 1189 pass | 1189 pass |
| 1190 | 1190 |
| 1191 | 1191 |
| 1192 Build() | 1192 Build() |
| OLD | NEW |