|
|
3e736a0 |
diff -up v8-3.14.5.10/SConstruct.python3 v8-3.14.5.10/SConstruct
|
|
|
3e736a0 |
--- v8-3.14.5.10/SConstruct.python3 2020-02-06 15:59:54.384811798 -0500
|
|
|
3e736a0 |
+++ v8-3.14.5.10/SConstruct 2020-02-06 16:28:20.272457921 -0500
|
|
|
3e736a0 |
@@ -31,7 +31,6 @@ import subprocess
|
|
|
3e736a0 |
import sys
|
|
|
3e736a0 |
import os
|
|
|
3e736a0 |
from os.path import join, dirname, abspath
|
|
|
3e736a0 |
-from types import DictType, StringTypes
|
|
|
3e736a0 |
root_dir = dirname(File('SConstruct').rfile().abspath)
|
|
|
3e736a0 |
src_dir = join(root_dir, 'src')
|
|
|
3e736a0 |
sys.path.insert(0, join(root_dir, 'tools'))
|
|
|
3e736a0 |
@@ -948,7 +947,7 @@ SUFFIXES = {
|
|
|
3e736a0 |
|
|
|
3e736a0 |
|
|
|
3e736a0 |
def Abort(message):
|
|
|
3e736a0 |
- print message
|
|
|
3e736a0 |
+ print(message)
|
|
|
3e736a0 |
sys.exit(1)
|
|
|
3e736a0 |
|
|
|
3e736a0 |
|
|
|
3e736a0 |
@@ -993,7 +992,7 @@ def GuessStrictAliasing(env):
|
|
|
3e736a0 |
# but when scons detects msvc this value is not set.
|
|
|
3e736a0 |
version = subprocess.Popen([env['CC'], '-dumpversion'],
|
|
|
3e736a0 |
stdout=subprocess.PIPE).communicate()[0]
|
|
|
3e736a0 |
- if version.find('4.5') == 0:
|
|
|
3e736a0 |
+ if version.find(b'4.5') == 0:
|
|
|
3e736a0 |
return 'off'
|
|
|
3e736a0 |
return 'default'
|
|
|
3e736a0 |
|
|
|
3e736a0 |
@@ -1104,7 +1103,7 @@ SIMPLE_OPTIONS = {
|
|
|
3e736a0 |
'(if available on the current architecture/platform)'
|
|
|
3e736a0 |
},
|
|
|
3e736a0 |
'sourcesignatures': {
|
|
|
3e736a0 |
- 'values': ['MD5', 'timestamp'],
|
|
|
3e736a0 |
+ 'values': ['MD5', 'MD5-timestamp'],
|
|
|
3e736a0 |
'default': 'MD5',
|
|
|
3e736a0 |
'help': 'set how the build system detects file changes'
|
|
|
3e736a0 |
},
|
|
|
3e736a0 |
@@ -1176,7 +1175,7 @@ ALL_OPTIONS = dict(PLATFORM_OPTIONS, **S
|
|
|
3e736a0 |
|
|
|
3e736a0 |
def AddOptions(options, result):
|
|
|
3e736a0 |
guess_env = Environment(options=result)
|
|
|
3e736a0 |
- for (name, option) in options.iteritems():
|
|
|
3e736a0 |
+ for (name, option) in options.items():
|
|
|
3e736a0 |
if 'guess' in option:
|
|
|
3e736a0 |
# Option has a guess function
|
|
|
3e736a0 |
guess = option.get('guess')
|
|
|
3e736a0 |
@@ -1189,7 +1188,7 @@ def AddOptions(options, result):
|
|
|
3e736a0 |
|
|
|
3e736a0 |
|
|
|
3e736a0 |
def GetOptions():
|
|
|
3e736a0 |
- result = Options()
|
|
|
3e736a0 |
+ result = Variables()
|
|
|
3e736a0 |
result.Add('mode', 'compilation mode (debug, release)', 'release')
|
|
|
3e736a0 |
result.Add('sample', 'build sample (shell, process, lineprocessor)', '')
|
|
|
3e736a0 |
result.Add('cache', 'directory to use for scons build cache', '')
|
|
|
3e736a0 |
@@ -1269,7 +1268,7 @@ def IsLegal(env, option, values):
|
|
|
3e736a0 |
|
|
|
3e736a0 |
|
|
|
3e736a0 |
def WarnAboutDeprecation():
|
|
|
3e736a0 |
- print """
|
|
|
3e736a0 |
+ print("""
|
|
|
3e736a0 |
#####################################################################
|
|
|
3e736a0 |
# #
|
|
|
3e736a0 |
# LAST WARNING: Building V8 with SCons is deprecated. #
|
|
|
3e736a0 |
@@ -1281,7 +1280,7 @@ def WarnAboutDeprecation():
|
|
|
3e736a0 |
# Instructions: http://code.google.com/p/v8/wiki/BuildingWithGYP. #
|
|
|
3e736a0 |
# #
|
|
|
3e736a0 |
#####################################################################
|
|
|
3e736a0 |
- """
|
|
|
3e736a0 |
+ """)
|
|
|
3e736a0 |
|
|
|
3e736a0 |
|
|
|
3e736a0 |
def VerifyOptions(env):
|
|
|
3e736a0 |
@@ -1316,12 +1315,12 @@ def VerifyOptions(env):
|
|
|
3e736a0 |
if env['cache'] and not os.path.isdir(env['cache']):
|
|
|
3e736a0 |
Abort("The specified cache directory does not exist.")
|
|
|
3e736a0 |
if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedaccesses' in ARGUMENTS):
|
|
|
3e736a0 |
- print env['arch']
|
|
|
3e736a0 |
- print env['simulator']
|
|
|
3e736a0 |
+ print(env['arch'])
|
|
|
3e736a0 |
+ print(env['simulator'])
|
|
|
3e736a0 |
Abort("Option unalignedaccesses only supported for the ARM architecture.")
|
|
|
3e736a0 |
if env['os'] != 'linux' and env['compress_startup_data'] != 'off':
|
|
|
3e736a0 |
Abort("Startup data compression is only available on Linux")
|
|
|
3e736a0 |
- for (name, option) in ALL_OPTIONS.iteritems():
|
|
|
3e736a0 |
+ for (name, option) in ALL_OPTIONS.items():
|
|
|
3e736a0 |
if (not name in env):
|
|
|
3e736a0 |
message = ("A value for option %s must be specified (%s)." %
|
|
|
3e736a0 |
(name, ", ".join(option['values'])))
|
|
|
3e736a0 |
@@ -1368,7 +1367,7 @@ class BuildContext(object):
|
|
|
3e736a0 |
def GetRelevantSources(self, source):
|
|
|
3e736a0 |
result = []
|
|
|
3e736a0 |
result += source.get('all', [])
|
|
|
3e736a0 |
- for (name, value) in self.options.iteritems():
|
|
|
3e736a0 |
+ for (name, value) in self.options.items():
|
|
|
3e736a0 |
source_value = source.get(name + ':' + value, [])
|
|
|
3e736a0 |
if type(source_value) == dict:
|
|
|
3e736a0 |
result += self.GetRelevantSources(source_value)
|
|
|
3e736a0 |
@@ -1379,7 +1378,7 @@ class BuildContext(object):
|
|
|
3e736a0 |
def AppendFlags(self, options, added):
|
|
|
3e736a0 |
if not added:
|
|
|
3e736a0 |
return
|
|
|
3e736a0 |
- for (key, value) in added.iteritems():
|
|
|
3e736a0 |
+ for (key, value) in added.items():
|
|
|
3e736a0 |
if key.find(':') != -1:
|
|
|
3e736a0 |
self.AddRelevantSubFlags(options, { key: value })
|
|
|
3e736a0 |
else:
|
|
|
3e736a0 |
@@ -1387,11 +1386,11 @@ class BuildContext(object):
|
|
|
3e736a0 |
options[key] = value
|
|
|
3e736a0 |
else:
|
|
|
3e736a0 |
prefix = options[key]
|
|
|
3e736a0 |
- if isinstance(prefix, StringTypes): prefix = prefix.split()
|
|
|
3e736a0 |
+ if isinstance(prefix, str): prefix = prefix.split()
|
|
|
3e736a0 |
options[key] = prefix + value
|
|
|
3e736a0 |
|
|
|
3e736a0 |
def ConfigureObject(self, env, input, **kw):
|
|
|
3e736a0 |
- if (kw.has_key('CPPPATH') and env.has_key('CPPPATH')):
|
|
|
3e736a0 |
+ if ('CPPPATH' in kw and 'CPPPATH' in env):
|
|
|
3e736a0 |
kw['CPPPATH'] += env['CPPPATH']
|
|
|
3e736a0 |
if self.options['library'] == 'static':
|
|
|
3e736a0 |
return env.StaticObject(input, **kw)
|
|
|
3e736a0 |
@@ -1401,7 +1400,7 @@ class BuildContext(object):
|
|
|
3e736a0 |
def ApplyEnvOverrides(self, env):
|
|
|
3e736a0 |
if not self.env_overrides:
|
|
|
3e736a0 |
return
|
|
|
3e736a0 |
- if type(env['ENV']) == DictType:
|
|
|
3e736a0 |
+ if type(env['ENV']) == dict:
|
|
|
3e736a0 |
env['ENV'].update(**self.env_overrides)
|
|
|
3e736a0 |
else:
|
|
|
3e736a0 |
env['ENV'] = self.env_overrides
|
|
|
3e736a0 |
@@ -1412,22 +1411,22 @@ def PostprocessOptions(options, os):
|
|
|
3e736a0 |
if (options['simulator'] != 'none') and (options['arch'] != options['simulator']):
|
|
|
3e736a0 |
if 'arch' in ARGUMENTS:
|
|
|
3e736a0 |
# Print a warning if arch has explicitly been set
|
|
|
3e736a0 |
- print "Warning: forcing architecture to match simulator (%s)" % options['simulator']
|
|
|
3e736a0 |
+ print("Warning: forcing architecture to match simulator ({})".format(options['simulator']))
|
|
|
3e736a0 |
options['arch'] = options['simulator']
|
|
|
3e736a0 |
if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'):
|
|
|
3e736a0 |
# Print a warning if profiling is enabled without profiling support
|
|
|
3e736a0 |
- print "Warning: forcing profilingsupport on when prof is on"
|
|
|
3e736a0 |
+ print("Warning: forcing profilingsupport on when prof is on")
|
|
|
3e736a0 |
options['profilingsupport'] = 'on'
|
|
|
3e736a0 |
if os == 'win32' and options['pgo'] != 'off' and options['msvcltcg'] == 'off':
|
|
|
3e736a0 |
if 'msvcltcg' in ARGUMENTS:
|
|
|
3e736a0 |
- print "Warning: forcing msvcltcg on as it is required for pgo (%s)" % options['pgo']
|
|
|
3e736a0 |
+ print("Warning: forcing msvcltcg on as it is required for pgo ({})".format(options['pgo']))
|
|
|
3e736a0 |
options['msvcltcg'] = 'on'
|
|
|
3e736a0 |
if (options['mipsabi'] != 'none') and (options['arch'] != 'mips') and (options['simulator'] != 'mips'):
|
|
|
3e736a0 |
options['mipsabi'] = 'none'
|
|
|
3e736a0 |
if options['liveobjectlist'] == 'on':
|
|
|
3e736a0 |
if (options['debuggersupport'] != 'on') or (options['mode'] == 'release'):
|
|
|
3e736a0 |
# Print a warning that liveobjectlist will implicitly enable the debugger
|
|
|
3e736a0 |
- print "Warning: forcing debuggersupport on for liveobjectlist"
|
|
|
3e736a0 |
+ print("Warning: forcing debuggersupport on for liveobjectlist")
|
|
|
3e736a0 |
options['debuggersupport'] = 'on'
|
|
|
3e736a0 |
options['inspector'] = 'on'
|
|
|
3e736a0 |
options['objectprint'] = 'on'
|
|
|
3e736a0 |
@@ -1559,7 +1558,7 @@ def BuildSpecific(env, mode, env_overrid
|
|
|
3e736a0 |
sample_env.Depends(sample_program, library)
|
|
|
3e736a0 |
context.sample_targets.append(sample_program)
|
|
|
3e736a0 |
|
|
|
3e736a0 |
- cctest_env = env.Copy()
|
|
|
3e736a0 |
+ cctest_env = env.Clone()
|
|
|
3e736a0 |
cctest_env.Prepend(LIBS=[library_name])
|
|
|
3e736a0 |
cctest_program = cctest_env.SConscript(
|
|
|
3e736a0 |
join('test', 'cctest', 'SConscript'),
|
|
|
3e736a0 |
@@ -1569,7 +1568,7 @@ def BuildSpecific(env, mode, env_overrid
|
|
|
3e736a0 |
)
|
|
|
3e736a0 |
context.cctest_targets.append(cctest_program)
|
|
|
3e736a0 |
|
|
|
3e736a0 |
- preparser_env = env.Copy()
|
|
|
3e736a0 |
+ preparser_env = env.Clone()
|
|
|
3e736a0 |
preparser_env.Replace(**context.flags['preparser'])
|
|
|
3e736a0 |
preparser_env.Prepend(LIBS=[preparser_library_name])
|
|
|
3e736a0 |
context.ApplyEnvOverrides(preparser_env)
|
|
|
3e736a0 |
@@ -1596,7 +1595,7 @@ def Build():
|
|
|
3e736a0 |
VerifyOptions(env)
|
|
|
3e736a0 |
env_overrides = ParseEnvOverrides(env['env'], env['importenv'])
|
|
|
3e736a0 |
|
|
|
3e736a0 |
- SourceSignatures(env['sourcesignatures'])
|
|
|
3e736a0 |
+ Decider(env['sourcesignatures'])
|
|
|
3e736a0 |
|
|
|
3e736a0 |
libraries = []
|
|
|
3e736a0 |
mksnapshots = []
|
|
|
3e736a0 |
@@ -1606,7 +1605,7 @@ def Build():
|
|
|
3e736a0 |
d8s = []
|
|
|
3e736a0 |
modes = SplitList(env['mode'])
|
|
|
3e736a0 |
for mode in modes:
|
|
|
3e736a0 |
- context = BuildSpecific(env.Copy(), mode, env_overrides, tools)
|
|
|
3e736a0 |
+ context = BuildSpecific(env.Clone(), mode, env_overrides, tools)
|
|
|
3e736a0 |
libraries += context.library_targets
|
|
|
3e736a0 |
mksnapshots += context.mksnapshot_targets
|
|
|
3e736a0 |
cctests += context.cctest_targets
|
|
|
3e736a0 |
diff -up v8-3.14.5.10/src/SConscript.python3 v8-3.14.5.10/src/SConscript
|
|
|
3e736a0 |
--- v8-3.14.5.10/src/SConscript.python3 2020-02-06 16:22:40.599976105 -0500
|
|
|
3e736a0 |
+++ v8-3.14.5.10/src/SConscript 2020-02-06 16:25:09.388681125 -0500
|
|
|
3e736a0 |
@@ -376,7 +376,7 @@ collection.js
|
|
|
3e736a0 |
|
|
|
3e736a0 |
|
|
|
3e736a0 |
def Abort(message):
|
|
|
3e736a0 |
- print message
|
|
|
3e736a0 |
+ print(message)
|
|
|
3e736a0 |
sys.exit(1)
|
|
|
3e736a0 |
|
|
|
3e736a0 |
|
|
|
3e736a0 |
@@ -435,7 +435,7 @@ def ConfigureObjectFiles():
|
|
|
3e736a0 |
# directory. Then rebuild the VM with the cross compiler and specify
|
|
|
3e736a0 |
# snapshot=nobuild on the scons command line.
|
|
|
3e736a0 |
empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc')
|
|
|
3e736a0 |
- mksnapshot_env = env.Copy()
|
|
|
3e736a0 |
+ mksnapshot_env = env.Clone()
|
|
|
3e736a0 |
mksnapshot_env.Replace(**context.flags['mksnapshot'])
|
|
|
3e736a0 |
mksnapshot_src = 'mksnapshot.cc'
|
|
|
3e736a0 |
mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_obj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb')
|