Index: SConstruct |
diff --git a/SConstruct b/SConstruct |
index 5f8616a6b8531f44ca0cfaa59f224527ffb69b20..e39766d7e749fcfb68a1c8f427e8649a88d3d174 100644 |
--- a/SConstruct |
+++ b/SConstruct |
@@ -180,6 +180,10 @@ LIBRARY_FLAGS = { |
'CCFLAGS': ['-m32'], |
'LINKFLAGS': ['-m32'], |
}, |
+ 'arch:sh4': { |
Jakob Kummerow
2012/11/07 11:18:24
Building V8 with SCons is deprecated (and already
remi.duraffort
2012/11/07 11:59:26
OK. Im just wondering how to cross compile using G
Jakob Kummerow
2012/11/07 13:25:12
GYP should be completely transparent to cross-comp
|
+ 'CCFLAGS': ['-mieee', '-fno-strict-aliasing'], |
+ 'CPPDEFINES': ['V8_TARGET_ARCH_SH4'] |
+ }, |
'arch:mips': { |
'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], |
'mips_arch_variant:mips32r2': { |
@@ -334,6 +338,11 @@ V8_EXTRA_FLAGS = { |
}, |
'disassembler:on': { |
'CPPDEFINES': ['ENABLE_DISASSEMBLER'] |
+ }, |
+ 'arch:sh4': { |
+ 'gpl_disassembler:on': { |
+ 'CPPDEFINES': ['USE_KERNEL_DISASM'] |
+ } |
} |
}, |
'msvc': { |
@@ -831,7 +840,6 @@ D8_FLAGS = { |
'all': { |
'library:shared': { |
'CPPDEFINES': ['V8_SHARED'], |
- 'LIBS': ['v8'], |
'LIBPATH': ['.'] |
}, |
}, |
@@ -994,7 +1002,7 @@ def GuessStrictAliasing(env): |
PLATFORM_OPTIONS = { |
'arch': { |
- 'values': ['arm', 'ia32', 'x64', 'mips'], |
+ 'values': ['arm', 'ia32', 'x64', 'mips', 'sh4'], |
'guess': GuessArch, |
'help': 'the architecture to build for' |
}, |
@@ -1157,12 +1165,26 @@ SIMPLE_OPTIONS = { |
'default': 'on', |
'help': 'use fpu instructions when building the snapshot [MIPS only]' |
}, |
+ 'backtracesupport': { |
+ 'values': ['on', 'off'], |
+ 'default': 'off', |
+ 'help': 'enable backtrace support for debug' |
+ }, |
+ 'logging': { |
+ 'values': ['on', 'off'], |
+ 'default': 'off', |
+ 'help': 'enable logging and profiling' |
+ }, |
+ 'gpl_disassembler': { |
+ 'values': [ 'on', 'off'], |
+ 'default': 'off', |
+ 'help': 'enable the disassembler from the linux kernel: This code is GPL, making libv8 GPL if activated' |
+ }, |
'I_know_I_should_build_with_GYP': { |
'values': ['yes', 'no'], |
'default': 'no', |
'help': 'grace period: temporarily override SCons deprecation' |
} |
- |
} |
ALL_OPTIONS = dict(PLATFORM_OPTIONS, **SIMPLE_OPTIONS) |
@@ -1412,6 +1434,10 @@ def PostprocessOptions(options, os): |
# Print a warning if profiling is enabled without profiling support |
print "Warning: forcing profilingsupport on when prof is on" |
options['profilingsupport'] = 'on' |
+ if (options['prof'] != 'off') and (options['logging'] == 'off'): |
+ # Print a warning if profiling is enabled without logging |
+ print "Warning: forcing logging on when prof is on" |
+ options['logging'] = 'on' |
if os == 'win32' and options['pgo'] != 'off' and options['msvcltcg'] == 'off': |
if 'msvcltcg' in ARGUMENTS: |
print "Warning: forcing msvcltcg on as it is required for pgo (%s)" % options['pgo'] |
@@ -1425,6 +1451,14 @@ def PostprocessOptions(options, os): |
options['debuggersupport'] = 'on' |
options['inspector'] = 'on' |
options['objectprint'] = 'on' |
+ if options['backtracesupport'] == 'on': |
+ if (options['mode'] == 'release'): |
+ # Print a warning that backtrace is deactivated in non release mode |
+ print "Warning: forcing backtracesupport off in release mode" |
+ options['backtracesupport'] = 'off' |
+ # Print a warning if the gpl_disassembler is used in release mode |
+ if options['gpl_disassembler'] == 'on' and options['mode'] == 'release': |
+ print "Warning: the GPL disassembler is enabled, making libv8 GPL too !" |
def ParseEnvOverrides(arg, imports): |
@@ -1534,6 +1568,7 @@ def BuildSpecific(env, mode, env_overrides, tools): |
shell = d8_env.Program('d8' + suffix, object_files + shell_files) |
else: |
shell = d8_env.Program('d8' + suffix, shell_files) |
+ d8_env.Prepend(LIBS=[library_name]) |
d8_env.Depends(shell, library) |
context.d8_targets.append(shell) |