From 36cdc7c8acda2a81a9e38df4978876659dc48bc3 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Fri, 8 May 2015 12:56:13 -0600 Subject: [PATCH] build: re-enable V8 snapshots Snapshots had been previously disabled because of a security vunerability. This has been fixed (ref: https://github.com/iojs/io.js/issues/1631#issuecomment-100101375) Also, re-enable snapshots for ARMv6 builds. There were previous build issues that have been fixed. Fixes: https://github.com/iojs/io.js/issues/1631 PR-URL: https://github.com/iojs/io.js/pull/1663 Reviewed-By: Ben Noordhuis --- configure | 20 ++++++++------------ vcbuild.bat | 6 +++--- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 4d4bf6e720149b..ec74149627fcc1 100755 --- a/configure +++ b/configure @@ -294,15 +294,15 @@ parser.add_option('--without-perfctr', dest='without_perfctr', help='build without performance counters') +# Dummy option for backwards compatibility parser.add_option('--with-snapshot', action='store_true', - dest='with_snapshot', + dest='unused_with_snapshot', help=optparse.SUPPRESS_HELP) -# Dummy option for backwards compatibility. parser.add_option('--without-snapshot', action='store_true', - dest='unused_without_snapshot', + dest='without_snapshot', help=optparse.SUPPRESS_HELP) parser.add_option('--without-ssl', @@ -579,10 +579,6 @@ def configure_arm(o): o['variables']['arm_fpu'] = 'vfpv3' o['variables']['arm_version'] = '7' - # Print warning when snapshot is enabled and building on armv6 - if is_arch_armv6() and options.with_snapshot: - warn('when building on ARMv6, don\'t use --with-snapshot') - def configure_mips(o): can_use_fpu_instructions = (options.mips_float_abi != 'soft') @@ -604,10 +600,10 @@ def configure_node(o): o['variables']['host_arch'] = host_arch o['variables']['target_arch'] = target_arch - if target_arch != host_arch and options.with_snapshot: - o['variables']['want_separate_host_toolset'] = 1 - else: - o['variables']['want_separate_host_toolset'] = 0 + cross_compiling = target_arch != host_arch + want_snapshots = not options.without_snapshot + o['variables']['want_separate_host_toolset'] = int( + cross_compiling and want_snapshots) if target_arch == 'arm': configure_arm(o) @@ -713,7 +709,7 @@ def configure_v8(o): o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs. o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds. o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. - o['variables']['v8_use_snapshot'] = b(options.with_snapshot) + o['variables']['v8_use_snapshot'] = 0 if options.without_snapshot else 1 def configure_openssl(o): o['variables']['node_use_openssl'] = b(not options.without_ssl) diff --git a/vcbuild.bat b/vcbuild.bat index 97d6ba3bbc5511..9132acbf44588d 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -21,7 +21,7 @@ set snapshot_arg= set noprojgen= set nobuild= set nosign= -set snapshot= +set nosnapshot= set test_args= set msi= set licensertf= @@ -47,7 +47,7 @@ if /i "%1"=="x64" set target_arch=x64&goto arg-ok if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok if /i "%1"=="nobuild" set nobuild=1&goto arg-ok if /i "%1"=="nosign" set nosign=1&goto arg-ok -if /i "%1"=="snapshot" set snapshot=1&goto arg-ok +if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok if /i "%1"=="noetw" set noetw=1&goto arg-ok if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok if /i "%1"=="licensertf" set licensertf=1&goto arg-ok @@ -76,7 +76,7 @@ goto next-arg :args-done if "%config%"=="Debug" set debug_arg=--debug if "%target_arch%"=="x64" set msiplatform=x64 -if defined snapshot set snapshot_arg=--with-snapshot +if defined nosnapshot set snapshot_arg=--without-snapshot if defined noetw set noetw_arg=--without-etw& set noetw_msi_arg=/p:NoETW=1 if defined noperfctr set noperfctr_arg=--without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1