Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: SConstruct

Issue 2745014: Allow users to specify a scons build cache directory. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 'default': 'off', 775 'default': 'off',
776 'help': 'select profile guided optimization variant', 776 'help': 'select profile guided optimization variant',
777 } 777 }
778 } 778 }
779 779
780 780
781 def GetOptions(): 781 def GetOptions():
782 result = Options() 782 result = Options()
783 result.Add('mode', 'compilation mode (debug, release)', 'release') 783 result.Add('mode', 'compilation mode (debug, release)', 'release')
784 result.Add('sample', 'build sample (shell, process, lineprocessor)', '') 784 result.Add('sample', 'build sample (shell, process, lineprocessor)', '')
785 result.Add('cache', 'directory to use for scons build cache', '')
785 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,.. .)', '') 786 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,.. .)', '')
786 result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '') 787 result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '')
787 for (name, option) in SIMPLE_OPTIONS.iteritems(): 788 for (name, option) in SIMPLE_OPTIONS.iteritems():
788 help = '%s (%s)' % (name, ", ".join(option['values'])) 789 help = '%s (%s)' % (name, ", ".join(option['values']))
789 result.Add(name, help, option.get('default')) 790 result.Add(name, help, option.get('default'))
790 return result 791 return result
791 792
792 793
793 def GetVersionComponents(): 794 def GetVersionComponents():
794 MAJOR_VERSION_PATTERN = re.compile(r"#define\s+MAJOR_VERSION\s+(.*)") 795 MAJOR_VERSION_PATTERN = re.compile(r"#define\s+MAJOR_VERSION\s+(.*)")
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' : 857 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' :
857 Abort("Profiling on windows only supported for static library.") 858 Abort("Profiling on windows only supported for static library.")
858 if env['prof'] == 'oprofile' and env['os'] != 'linux': 859 if env['prof'] == 'oprofile' and env['os'] != 'linux':
859 Abort("OProfile is only supported on Linux.") 860 Abort("OProfile is only supported on Linux.")
860 if env['os'] == 'win32' and env['soname'] == 'on': 861 if env['os'] == 'win32' and env['soname'] == 'on':
861 Abort("Shared Object soname not applicable for Windows.") 862 Abort("Shared Object soname not applicable for Windows.")
862 if env['soname'] == 'on' and env['library'] == 'static': 863 if env['soname'] == 'on' and env['library'] == 'static':
863 Abort("Shared Object soname not applicable for static library.") 864 Abort("Shared Object soname not applicable for static library.")
864 if env['os'] != 'win32' and env['pgo'] != 'off': 865 if env['os'] != 'win32' and env['pgo'] != 'off':
865 Abort("Profile guided optimization only supported on Windows.") 866 Abort("Profile guided optimization only supported on Windows.")
867 if env['cache'] and not os.path.isdir(env['cache']):
868 Abort("The specified cache directory does not exist.")
866 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce sses' in ARGUMENTS): 869 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce sses' in ARGUMENTS):
867 print env['arch'] 870 print env['arch']
868 print env['simulator'] 871 print env['simulator']
869 Abort("Option unalignedaccesses only supported for the ARM architecture.") 872 Abort("Option unalignedaccesses only supported for the ARM architecture.")
870 for (name, option) in SIMPLE_OPTIONS.iteritems(): 873 for (name, option) in SIMPLE_OPTIONS.iteritems():
871 if (not option.get('default')) and (name not in ARGUMENTS): 874 if (not option.get('default')) and (name not in ARGUMENTS):
872 message = ("A value for option %s must be specified (%s)." % 875 message = ("A value for option %s must be specified (%s)." %
873 (name, ", ".join(option['values']))) 876 (name, ", ".join(option['values'])))
874 Abort(message) 877 Abort(message)
875 if not env[name] in option['values']: 878 if not env[name] in option['values']:
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 env.Alias('mksnapshot', mksnapshots) 1127 env.Alias('mksnapshot', mksnapshots)
1125 env.Alias('cctests', cctests) 1128 env.Alias('cctests', cctests)
1126 env.Alias('sample', samples) 1129 env.Alias('sample', samples)
1127 env.Alias('d8', d8s) 1130 env.Alias('d8', d8s)
1128 1131
1129 if env['sample']: 1132 if env['sample']:
1130 env.Default('sample') 1133 env.Default('sample')
1131 else: 1134 else:
1132 env.Default('library') 1135 env.Default('library')
1133 1136
1137 if env['cache']:
1138 CacheDir(env['cache'])
1134 1139
1135 # We disable deprecation warnings because we need to be able to use 1140 # We disable deprecation warnings because we need to be able to use
1136 # env.Copy without getting warnings for compatibility with older 1141 # env.Copy without getting warnings for compatibility with older
1137 # version of scons. Also, there's a bug in some revisions that 1142 # 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. 1143 # doesn't allow this flag to be set, so we swallow any exceptions.
1139 # Lovely. 1144 # Lovely.
1140 try: 1145 try:
1141 SetOption('warn', 'no-deprecated') 1146 SetOption('warn', 'no-deprecated')
1142 except: 1147 except:
1143 pass 1148 pass
1144 1149
1145 1150
1146 Build() 1151 Build()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698