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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
782 | 782 |
783 | 783 |
784 def BuildSpecific(env, mode, env_overrides): | 784 def BuildSpecific(env, mode, env_overrides): |
785 options = {'mode': mode} | 785 options = {'mode': mode} |
786 for option in SIMPLE_OPTIONS: | 786 for option in SIMPLE_OPTIONS: |
787 options[option] = env[option] | 787 options[option] = env[option] |
788 PostprocessOptions(options) | 788 PostprocessOptions(options) |
789 | 789 |
790 context = BuildContext(options, env_overrides, samples=SplitList(env['sample'] )) | 790 context = BuildContext(options, env_overrides, samples=SplitList(env['sample'] )) |
791 | 791 |
792 library_flags = context.AddRelevantFlags(os.environ, LIBRARY_FLAGS) | 792 # Remove variables which can't be imported from the user's external |
793 # environment into a construction environment. | |
794 user_environ = os.environ.copy() | |
795 for var in ('ENV',): | |
796 try: | |
797 del user_environ[var] | |
798 except KeyError: | |
799 pass | |
800 | |
801 library_flags = context.AddRelevantFlags(user_environ, LIBRARY_FLAGS) | |
793 v8_flags = context.AddRelevantFlags(library_flags, V8_EXTRA_FLAGS) | 802 v8_flags = context.AddRelevantFlags(library_flags, V8_EXTRA_FLAGS) |
794 mksnapshot_flags = context.AddRelevantFlags(library_flags, MKSNAPSHOT_EXTRA_FL AGS) | 803 mksnapshot_flags = context.AddRelevantFlags(library_flags, MKSNAPSHOT_EXTRA_FL AGS) |
795 dtoa_flags = context.AddRelevantFlags(library_flags, DTOA_EXTRA_FLAGS) | 804 dtoa_flags = context.AddRelevantFlags(library_flags, DTOA_EXTRA_FLAGS) |
796 cctest_flags = context.AddRelevantFlags(v8_flags, CCTEST_EXTRA_FLAGS) | 805 cctest_flags = context.AddRelevantFlags(v8_flags, CCTEST_EXTRA_FLAGS) |
797 sample_flags = context.AddRelevantFlags(os.environ, SAMPLE_FLAGS) | 806 sample_flags = context.AddRelevantFlags(os.environ, SAMPLE_FLAGS) |
Mads Ager (chromium)
2009/08/25 06:29:05
Should use |user_environ| here as well.
| |
798 d8_flags = context.AddRelevantFlags(library_flags, D8_FLAGS) | 807 d8_flags = context.AddRelevantFlags(library_flags, D8_FLAGS) |
799 | 808 |
800 context.flags = { | 809 context.flags = { |
801 'v8': v8_flags, | 810 'v8': v8_flags, |
802 'mksnapshot': mksnapshot_flags, | 811 'mksnapshot': mksnapshot_flags, |
803 'dtoa': dtoa_flags, | 812 'dtoa': dtoa_flags, |
804 'cctest': cctest_flags, | 813 'cctest': cctest_flags, |
805 'sample': sample_flags, | 814 'sample': sample_flags, |
806 'd8': d8_flags | 815 'd8': d8_flags |
807 } | 816 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
917 # version of scons. Also, there's a bug in some revisions that | 926 # version of scons. Also, there's a bug in some revisions that |
918 # doesn't allow this flag to be set, so we swallow any exceptions. | 927 # doesn't allow this flag to be set, so we swallow any exceptions. |
919 # Lovely. | 928 # Lovely. |
920 try: | 929 try: |
921 SetOption('warn', 'no-deprecated') | 930 SetOption('warn', 'no-deprecated') |
922 except: | 931 except: |
923 pass | 932 pass |
924 | 933 |
925 | 934 |
926 Build() | 935 Build() |
OLD | NEW |