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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 'values': ['arm', 'thumb2', 'none'], | 670 'values': ['arm', 'thumb2', 'none'], |
671 'default': 'none', | 671 'default': 'none', |
672 'help': 'generate thumb2 instructions instead of arm instructions (default)' | 672 'help': 'generate thumb2 instructions instead of arm instructions (default)' |
673 } | 673 } |
674 } | 674 } |
675 | 675 |
676 | 676 |
677 def GetOptions(): | 677 def GetOptions(): |
678 result = Options() | 678 result = Options() |
679 result.Add('mode', 'compilation mode (debug, release)', 'release') | 679 result.Add('mode', 'compilation mode (debug, release)', 'release') |
680 result.Add('sample', 'build sample (shell, process)', '') | 680 result.Add('sample', 'build sample (shell, process, lineprocessor)', '') |
681 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,..
.)', '') | 681 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,..
.)', '') |
682 result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '') | 682 result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '') |
683 for (name, option) in SIMPLE_OPTIONS.iteritems(): | 683 for (name, option) in SIMPLE_OPTIONS.iteritems(): |
684 help = '%s (%s)' % (name, ", ".join(option['values'])) | 684 help = '%s (%s)' % (name, ", ".join(option['values'])) |
685 result.Add(name, help, option.get('default')) | 685 result.Add(name, help, option.get('default')) |
686 return result | 686 return result |
687 | 687 |
688 | 688 |
689 def GetVersionComponents(): | 689 def GetVersionComponents(): |
690 MAJOR_VERSION_PATTERN = re.compile(r"#define\s+MAJOR_VERSION\s+(.*)") | 690 MAJOR_VERSION_PATTERN = re.compile(r"#define\s+MAJOR_VERSION\s+(.*)") |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 for s in SplitList(str): | 738 for s in SplitList(str): |
739 if not s in values: | 739 if not s in values: |
740 Abort("Illegal value for option %s '%s'." % (option, s)) | 740 Abort("Illegal value for option %s '%s'." % (option, s)) |
741 return False | 741 return False |
742 return True | 742 return True |
743 | 743 |
744 | 744 |
745 def VerifyOptions(env): | 745 def VerifyOptions(env): |
746 if not IsLegal(env, 'mode', ['debug', 'release']): | 746 if not IsLegal(env, 'mode', ['debug', 'release']): |
747 return False | 747 return False |
748 if not IsLegal(env, 'sample', ["shell", "process"]): | 748 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): |
749 return False | 749 return False |
750 if not IsLegal(env, 'regexp', ["native", "interpreted"]): | 750 if not IsLegal(env, 'regexp', ["native", "interpreted"]): |
751 return False | 751 return False |
752 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on'
: | 752 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on'
: |
753 Abort("Profiling on windows only supported for static library.") | 753 Abort("Profiling on windows only supported for static library.") |
754 if env['prof'] == 'oprofile' and env['os'] != 'linux': | 754 if env['prof'] == 'oprofile' and env['os'] != 'linux': |
755 Abort("OProfile is only supported on Linux.") | 755 Abort("OProfile is only supported on Linux.") |
756 if env['os'] == 'win32' and env['soname'] == 'on': | 756 if env['os'] == 'win32' and env['soname'] == 'on': |
757 Abort("Shared Object soname not applicable for Windows.") | 757 Abort("Shared Object soname not applicable for Windows.") |
758 if env['soname'] == 'on' and env['library'] == 'static': | 758 if env['soname'] == 'on' and env['library'] == 'static': |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 # version of scons. Also, there's a bug in some revisions that | 1019 # version of scons. Also, there's a bug in some revisions that |
1020 # doesn't allow this flag to be set, so we swallow any exceptions. | 1020 # doesn't allow this flag to be set, so we swallow any exceptions. |
1021 # Lovely. | 1021 # Lovely. |
1022 try: | 1022 try: |
1023 SetOption('warn', 'no-deprecated') | 1023 SetOption('warn', 'no-deprecated') |
1024 except: | 1024 except: |
1025 pass | 1025 pass |
1026 | 1026 |
1027 | 1027 |
1028 Build() | 1028 Build() |
OLD | NEW |