| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 def GuessToolchain(os): | 647 def GuessToolchain(os): |
| 648 tools = Environment()['TOOLS'] | 648 tools = Environment()['TOOLS'] |
| 649 if 'gcc' in tools: | 649 if 'gcc' in tools: |
| 650 return 'gcc' | 650 return 'gcc' |
| 651 elif 'msvc' in tools: | 651 elif 'msvc' in tools: |
| 652 return 'msvc' | 652 return 'msvc' |
| 653 else: | 653 else: |
| 654 return None | 654 return None |
| 655 | 655 |
| 656 | 656 |
| 657 def GuessVisibility(os, toolchain): |
| 658 if os == 'win32' and toolchain == 'gcc': |
| 659 # MinGW can't do it. |
| 660 return 'default' |
| 661 else: |
| 662 return 'hidden' |
| 663 |
| 664 |
| 657 OS_GUESS = utils.GuessOS() | 665 OS_GUESS = utils.GuessOS() |
| 658 TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) | 666 TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) |
| 659 ARCH_GUESS = utils.GuessArchitecture() | 667 ARCH_GUESS = utils.GuessArchitecture() |
| 668 VISIBILITY_GUESS = GuessVisibility(OS_GUESS, TOOLCHAIN_GUESS) |
| 660 | 669 |
| 661 | 670 |
| 662 SIMPLE_OPTIONS = { | 671 SIMPLE_OPTIONS = { |
| 663 'toolchain': { | 672 'toolchain': { |
| 664 'values': ['gcc', 'msvc'], | 673 'values': ['gcc', 'msvc'], |
| 665 'default': TOOLCHAIN_GUESS, | 674 'default': TOOLCHAIN_GUESS, |
| 666 'help': 'the toolchain to use (%s)' % TOOLCHAIN_GUESS | 675 'help': 'the toolchain to use (%s)' % TOOLCHAIN_GUESS |
| 667 }, | 676 }, |
| 668 'os': { | 677 'os': { |
| 669 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'sola
ris'], | 678 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'sola
ris'], |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 'default': 'dumb', | 764 'default': 'dumb', |
| 756 'help': 'the console to use for the d8 shell' | 765 'help': 'the console to use for the d8 shell' |
| 757 }, | 766 }, |
| 758 'verbose': { | 767 'verbose': { |
| 759 'values': ['on', 'off'], | 768 'values': ['on', 'off'], |
| 760 'default': 'off', | 769 'default': 'off', |
| 761 'help': 'more output from compiler and linker' | 770 'help': 'more output from compiler and linker' |
| 762 }, | 771 }, |
| 763 'visibility': { | 772 'visibility': { |
| 764 'values': ['default', 'hidden'], | 773 'values': ['default', 'hidden'], |
| 765 'default': 'hidden', | 774 'default': VISIBILITY_GUESS, |
| 766 'help': 'shared library symbol visibility' | 775 'help': 'shared library symbol visibility (%s)' % VISIBILITY_GUESS |
| 767 }, | 776 }, |
| 768 'pgo': { | 777 'pgo': { |
| 769 'values': ['off', 'instrument', 'optimize'], | 778 'values': ['off', 'instrument', 'optimize'], |
| 770 'default': 'off', | 779 'default': 'off', |
| 771 'help': 'select profile guided optimization variant', | 780 'help': 'select profile guided optimization variant', |
| 772 } | 781 } |
| 773 } | 782 } |
| 774 | 783 |
| 775 | 784 |
| 776 def GetOptions(): | 785 def GetOptions(): |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 # version of scons. Also, there's a bug in some revisions that | 1146 # version of scons. Also, there's a bug in some revisions that |
| 1138 # doesn't allow this flag to be set, so we swallow any exceptions. | 1147 # doesn't allow this flag to be set, so we swallow any exceptions. |
| 1139 # Lovely. | 1148 # Lovely. |
| 1140 try: | 1149 try: |
| 1141 SetOption('warn', 'no-deprecated') | 1150 SetOption('warn', 'no-deprecated') |
| 1142 except: | 1151 except: |
| 1143 pass | 1152 pass |
| 1144 | 1153 |
| 1145 | 1154 |
| 1146 Build() | 1155 Build() |
| OLD | NEW |