Index: SConstruct |
=================================================================== |
--- SConstruct (revision 1169) |
+++ SConstruct (working copy) |
@@ -303,7 +303,7 @@ |
'help': 'the architecture to build for' |
}, |
'snapshot': { |
- 'values': ['on', 'off'], |
+ 'values': ['on', 'off', 'nobuild'], |
'default': 'off', |
'help': 'build using snapshots for faster start-up' |
}, |
@@ -396,13 +396,15 @@ |
def __init__(self, options, env_overrides, samples): |
self.library_targets = [] |
+ self.mksnapshot_targets = [] |
self.cctest_targets = [] |
self.sample_targets = [] |
self.d8_targets = [] |
self.options = options |
self.env_overrides = env_overrides |
self.samples = samples |
- self.use_snapshot = (options['snapshot'] == 'on') |
+ self.use_snapshot = (options['snapshot'] != 'off') |
+ self.build_snapshot = (options['snapshot'] == 'on') |
self.flags = None |
def AddRelevantFlags(self, initial, flags): |
@@ -496,6 +498,7 @@ |
context.flags = { |
'v8': v8_flags, |
+ 'mksnapshot': v8_flags, |
'jscre': jscre_flags, |
'dtoa': dtoa_flags, |
'cctest': cctest_flags, |
@@ -509,13 +512,15 @@ |
env['LIBRARY'] = library_name |
# Build the object files by invoking SCons recursively. |
- (object_files, shell_files) = env.SConscript( |
+ (object_files, shell_files, mksnapshot) = env.SConscript( |
join('src', 'SConscript'), |
build_dir=join('obj', target_id), |
exports='context', |
duplicate=False |
) |
+ context.mksnapshot_targets.append(mksnapshot) |
+ |
# Link the object files into a library. |
env.Replace(**context.flags['v8']) |
context.ApplyEnvOverrides(env) |
@@ -570,6 +575,7 @@ |
SourceSignatures(env['sourcesignatures']) |
libraries = [] |
+ mksnapshots = [] |
cctests = [] |
samples = [] |
d8s = [] |
@@ -577,11 +583,13 @@ |
for mode in modes: |
context = BuildSpecific(env.Copy(), mode, env_overrides) |
libraries += context.library_targets |
+ mksnapshots += context.mksnapshot_targets |
cctests += context.cctest_targets |
samples += context.sample_targets |
d8s += context.d8_targets |
env.Alias('library', libraries) |
+ env.Alias('mksnapshot', mksnapshots) |
env.Alias('cctests', cctests) |
env.Alias('sample', samples) |
env.Alias('d8', d8s) |