Permalink
Browse files

Add --without-snapshot configure option

  • Loading branch information...
1 parent 4593c04 commit ae5d613b3e1253e23c6de54105053f4cf4a726aa @ry ry committed Aug 15, 2010
Showing with 17 additions and 2 deletions.
  1. +17 −2 wscript
View
19 wscript
@@ -43,6 +43,13 @@ def set_options(opt):
, dest='efence'
)
+ opt.add_option( '--without-snapshot'
+ , action='store_true'
+ , default=False
+ , help='Build without snapshotting V8 libraries. You might want to set this for cross-compiling. [Default: False]'
+ , dest='without_snapshot'
+ )
+
opt.add_option( '--without-ssl'
, action='store_true'
, default=False
@@ -135,6 +142,7 @@ def configure(conf):
o = Options.options
conf.env["USE_DEBUG"] = o.debug
+ conf.env["SNAPSHOT_V8"] = not o.without_snapshot
conf.env["USE_SHARED_V8"] = o.shared_v8 or o.shared_v8_includes or o.shared_v8_libpath or o.shared_v8_libname
conf.env["USE_SHARED_CARES"] = o.shared_cares or o.shared_cares_includes or o.shared_cares_libpath
@@ -323,16 +331,23 @@ def v8_cmd(bld, variant):
else:
mode = "debug"
- cmd_R = 'python "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s library=static snapshot=on'
+ if bld.env["SNAPSHOT_V8"]:
+ snapshot = "snapshot=on"
+ else:
+ snapshot = ""
+
+ cmd_R = 'python "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s library=static %s'
cmd = cmd_R % ( scons
, Options.options.jobs
, bld.srcnode.abspath(bld.env_of_name(variant))
, v8dir_src
, mode
, arch
+ , snapshot
)
- return cmd
+
+ return ("echo '%s' && " % cmd) + cmd
def build_v8(bld):

0 comments on commit ae5d613

Please sign in to comment.