OLD | NEW |
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 'vfp3': { | 1150 'vfp3': { |
1151 'values': ['on', 'off'], | 1151 'values': ['on', 'off'], |
1152 'default': 'on', | 1152 'default': 'on', |
1153 'help': 'use vfp3 instructions when building the snapshot [Arm only]' | 1153 'help': 'use vfp3 instructions when building the snapshot [Arm only]' |
1154 }, | 1154 }, |
1155 'fpu': { | 1155 'fpu': { |
1156 'values': ['on', 'off'], | 1156 'values': ['on', 'off'], |
1157 'default': 'on', | 1157 'default': 'on', |
1158 'help': 'use fpu instructions when building the snapshot [MIPS only]' | 1158 'help': 'use fpu instructions when building the snapshot [MIPS only]' |
1159 }, | 1159 }, |
| 1160 'I_know_I_should_build_with_GYP': { |
| 1161 'values': ['yes', 'no'], |
| 1162 'default': 'no', |
| 1163 'help': 'grace period: temporarily override SCons deprecation' |
| 1164 } |
1160 | 1165 |
1161 } | 1166 } |
1162 | 1167 |
1163 ALL_OPTIONS = dict(PLATFORM_OPTIONS, **SIMPLE_OPTIONS) | 1168 ALL_OPTIONS = dict(PLATFORM_OPTIONS, **SIMPLE_OPTIONS) |
1164 | 1169 |
1165 | 1170 |
1166 def AddOptions(options, result): | 1171 def AddOptions(options, result): |
1167 guess_env = Environment(options=result) | 1172 guess_env = Environment(options=result) |
1168 for (name, option) in options.iteritems(): | 1173 for (name, option) in options.iteritems(): |
1169 if 'guess' in option: | 1174 if 'guess' in option: |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 | 1255 |
1251 def IsLegal(env, option, values): | 1256 def IsLegal(env, option, values): |
1252 str = env[option] | 1257 str = env[option] |
1253 for s in SplitList(str): | 1258 for s in SplitList(str): |
1254 if not s in values: | 1259 if not s in values: |
1255 Abort("Illegal value for option %s '%s'." % (option, s)) | 1260 Abort("Illegal value for option %s '%s'." % (option, s)) |
1256 return False | 1261 return False |
1257 return True | 1262 return True |
1258 | 1263 |
1259 | 1264 |
| 1265 def WarnAboutDeprecation(): |
| 1266 print """ |
| 1267 ##################################################################### |
| 1268 # # |
| 1269 # LAST WARNING: Building V8 with SCons is deprecated. # |
| 1270 # # |
| 1271 # This only works because you have overridden the kill switch. # |
| 1272 # # |
| 1273 # MIGRATE TO THE GYP-BASED BUILD NOW! # |
| 1274 # # |
| 1275 # Instructions: http://code.google.com/p/v8/wiki/BuildingWithGYP. # |
| 1276 # # |
| 1277 ##################################################################### |
| 1278 """ |
| 1279 |
| 1280 |
1260 def VerifyOptions(env): | 1281 def VerifyOptions(env): |
| 1282 if env['I_know_I_should_build_with_GYP'] != 'yes': |
| 1283 Abort("Building V8 with SCons is no longer supported. Please use GYP " |
| 1284 "instead; you can find instructions are at " |
| 1285 "http://code.google.com/p/v8/wiki/BuildingWithGYP.\n\n" |
| 1286 "Quitting.\n\n" |
| 1287 "For a limited grace period, you can specify " |
| 1288 "\"I_know_I_should_build_with_GYP=yes\" to override.") |
| 1289 else: |
| 1290 WarnAboutDeprecation() |
| 1291 import atexit |
| 1292 atexit.register(WarnAboutDeprecation) |
| 1293 |
1261 if not IsLegal(env, 'mode', ['debug', 'release']): | 1294 if not IsLegal(env, 'mode', ['debug', 'release']): |
1262 return False | 1295 return False |
1263 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): | 1296 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): |
1264 return False | 1297 return False |
1265 if not IsLegal(env, 'regexp', ["native", "interpreted"]): | 1298 if not IsLegal(env, 'regexp', ["native", "interpreted"]): |
1266 return False | 1299 return False |
1267 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on'
: | 1300 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on'
: |
1268 Abort("Profiling on windows only supported for static library.") | 1301 Abort("Profiling on windows only supported for static library.") |
1269 if env['gdbjit'] == 'on' and ((env['os'] != 'linux' and env['os'] != 'macos')
or (env['arch'] != 'ia32' and env['arch'] != 'x64' and env['arch'] != 'arm')): | 1302 if env['gdbjit'] == 'on' and ((env['os'] != 'linux' and env['os'] != 'macos')
or (env['arch'] != 'ia32' and env['arch'] != 'x64' and env['arch'] != 'arm')): |
1270 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64)
Linux/OSX target.") | 1303 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64)
Linux/OSX target.") |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1593 # We disable deprecation warnings because we need to be able to use | 1626 # We disable deprecation warnings because we need to be able to use |
1594 # env.Copy without getting warnings for compatibility with older | 1627 # env.Copy without getting warnings for compatibility with older |
1595 # version of scons. Also, there's a bug in some revisions that | 1628 # version of scons. Also, there's a bug in some revisions that |
1596 # doesn't allow this flag to be set, so we swallow any exceptions. | 1629 # doesn't allow this flag to be set, so we swallow any exceptions. |
1597 # Lovely. | 1630 # Lovely. |
1598 try: | 1631 try: |
1599 SetOption('warn', 'no-deprecated') | 1632 SetOption('warn', 'no-deprecated') |
1600 except: | 1633 except: |
1601 pass | 1634 pass |
1602 | 1635 |
1603 | |
1604 def WarnAboutDeprecation(): | |
1605 print """ | |
1606 ####################################################### | |
1607 # WARNING: Building V8 with SCons is deprecated and # | |
1608 # will not work much longer. Please switch to using # | |
1609 # the GYP-based build now. Instructions are at # | |
1610 # http://code.google.com/p/v8/wiki/BuildingWithGYP. # | |
1611 ####################################################### | |
1612 """ | |
1613 | |
1614 WarnAboutDeprecation() | |
1615 import atexit | |
1616 atexit.register(WarnAboutDeprecation) | |
1617 Build() | 1636 Build() |
OLD | NEW |