Commit 03f49567 authored by rmcilroy@chromium.org's avatar rmcilroy@chromium.org

v8_external_snapshot target visible only when using v8_use_external_startup_data

Prevent snapshot_blob.bin from being unnecessarily generated when building all targets.
When such file exists, chrome_tests assumes we will load V8's initial snapshot from
external files, even when such feature is turned off, which prevents the tests from
being successfully compiled.

BUG=421063
LOG=N
R=rmcilroy@chromium.org

Review URL: https://codereview.chromium.org/643163002

Patch from André Baixo <baixo@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3dae2a0d
...@@ -229,56 +229,65 @@ ...@@ -229,56 +229,65 @@
'target_name': 'v8_external_snapshot', 'target_name': 'v8_external_snapshot',
'type': 'static_library', 'type': 'static_library',
'conditions': [ 'conditions': [
['want_separate_host_toolset==1', { [ 'v8_use_external_startup_data==1', {
'toolsets': ['host', 'target'], 'conditions': [
'dependencies': [ ['want_separate_host_toolset==1', {
'mksnapshot#host', 'toolsets': ['host', 'target'],
'js2c#host', 'dependencies': [
'natives_blob', 'mksnapshot#host',
]}, { 'js2c#host',
'toolsets': ['target'], 'natives_blob',
]}, {
'toolsets': ['target'],
'dependencies': [
'mksnapshot',
'js2c',
'natives_blob',
],
}],
['component=="shared_library"', {
'defines': [
'V8_SHARED',
'BUILDING_V8_SHARED',
],
'direct_dependent_settings': {
'defines': [
'V8_SHARED',
'USING_V8_SHARED',
],
},
}],
],
'dependencies': [ 'dependencies': [
'mksnapshot', 'v8_base',
'js2c',
'natives_blob',
], ],
}], 'include_dirs+': [
['component=="shared_library"', { '../..',
'defines': [
'V8_SHARED',
'BUILDING_V8_SHARED',
], ],
'direct_dependent_settings': { 'sources': [
'defines': [ '../../src/natives-external.cc',
'V8_SHARED', '../../src/snapshot-external.cc',
'USING_V8_SHARED',
],
},
}],
],
'dependencies': [
'v8_base',
],
'include_dirs+': [
'../..',
],
'sources': [
'../../src/natives-external.cc',
'../../src/snapshot-external.cc',
],
'actions': [
{
'action_name': 'run_mksnapshot (external)',
'inputs': [
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
], ],
'conditions': [ 'actions': [
['want_separate_host_toolset==1', { {
'target_conditions': [ 'action_name': 'run_mksnapshot (external)',
['_toolset=="host"', { 'inputs': [
'outputs': [ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
'<(INTERMEDIATE_DIR)/snapshot.cc', ],
'<(PRODUCT_DIR)/snapshot_blob_host.bin', 'conditions': [
['want_separate_host_toolset==1', {
'target_conditions': [
['_toolset=="host"', {
'outputs': [
'<(INTERMEDIATE_DIR)/snapshot.cc',
'<(PRODUCT_DIR)/snapshot_blob_host.bin',
],
}, {
'outputs': [
'<(INTERMEDIATE_DIR)/snapshot.cc',
'<(PRODUCT_DIR)/snapshot_blob.bin',
],
}],
], ],
}, { }, {
'outputs': [ 'outputs': [
...@@ -287,31 +296,26 @@ ...@@ -287,31 +296,26 @@
], ],
}], }],
], ],
}, { 'variables': {
'outputs': [ 'mksnapshot_flags': [
'<(INTERMEDIATE_DIR)/snapshot.cc', '--log-snapshot-positions',
'<(PRODUCT_DIR)/snapshot_blob.bin', '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
],
'conditions': [
['v8_random_seed!=0', {
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
}],
],
},
'action': [
'<@(_inputs)',
'<@(mksnapshot_flags)',
'<@(INTERMEDIATE_DIR)/snapshot.cc',
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin',
], ],
}], },
],
'variables': {
'mksnapshot_flags': [
'--log-snapshot-positions',
'--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
],
'conditions': [
['v8_random_seed!=0', {
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
}],
],
},
'action': [
'<@(_inputs)',
'<@(mksnapshot_flags)',
'<@(INTERMEDIATE_DIR)/snapshot.cc',
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin',
], ],
}, }],
], ],
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment