Commit 5a0df034 authored by machenbach's avatar machenbach Committed by Commit bot

[Ignition] Use separate startup data for ignition.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33724}
parent 9c006b72
......@@ -77,6 +77,7 @@
'--config-variable', 'component=<(component)',
'--config-variable', 'target_arch=<(target_arch)',
'--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)',
'--config-variable', 'v8_separate_ignition_snapshot=<(v8_separate_ignition_snapshot)',
'--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)',
'--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)',
],
......
......@@ -195,6 +195,9 @@
# their own default value.
'v8_use_external_startup_data%': 1,
# Use a separate ignition snapshot file in standalone builds.
'v8_separate_ignition_snapshot': 1,
# Relative path to icu.gyp from this file.
'icu_gyp_path': '../third_party/icu/icu.gyp',
......
......@@ -81,6 +81,9 @@
# The setting is ignored if want_separate_host_toolset is 0.
'v8_toolset_for_d8%': 'target',
# Control usage of a separate ignition snapshot file.
'v8_separate_ignition_snapshot%': 0,
'host_os%': '<(OS)',
'werror%': '-Werror',
# For a shared library build, results in "libv8-<(soname_version).so".
......
......@@ -22,6 +22,13 @@
],
},
}],
['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and v8_separate_ignition_snapshot==1', {
'variables': {
'files': [
'<(PRODUCT_DIR)/snapshot_blob_ignition.bin',
],
},
}],
['OS=="linux" and component=="shared_library" and target_arch=="ia32"', {
'variables': {
'files': [
......
......@@ -9,6 +9,7 @@
#include "src/base/logging.h"
#include "src/base/platform/platform.h"
#include "src/flags.h"
#include "src/utils.h"
......@@ -107,7 +108,9 @@ void InitializeExternalStartupData(const char* directory_path) {
char* natives;
char* snapshot;
LoadFromFiles(RelativePath(&natives, directory_path, "natives_blob.bin"),
RelativePath(&snapshot, directory_path, "snapshot_blob.bin"));
RelativePath(&snapshot, directory_path,
FLAG_ignition ? "snapshot_blob_ignition.bin"
: "snapshot_blob.bin"));
free(natives);
free(snapshot);
#endif // V8_USE_EXTERNAL_STARTUP_DATA
......
......@@ -283,6 +283,46 @@
],
},
}],
# Extra snapshot blob for ignition. Separate host toolset is not
# supported.
['v8_separate_ignition_snapshot==1', {
# This is concatenated to the other actions list of
# v8_external_snapshot.
'actions': [
{
'action_name': 'run_mksnapshot (ignition)',
'inputs': [
'<(mksnapshot_exec)',
],
'variables': {
# TODO: Extract common mksnapshot_flags to a separate
# variable.
'mksnapshot_flags_ignition': [
'--ignition',
'--log-snapshot-positions',
'--logfile', '<(INTERMEDIATE_DIR)/snapshot_ignition.log',
],
'conditions': [
['v8_random_seed!=0', {
'mksnapshot_flags_ignition': ['--random-seed', '<(v8_random_seed)'],
}],
['v8_vector_stores!=0', {
'mksnapshot_flags_ignition': ['--vector-stores'],
}],
],
},
'outputs': [
'<(PRODUCT_DIR)/snapshot_blob_ignition.bin',
],
'action': [
'<(mksnapshot_exec)',
'<@(mksnapshot_flags_ignition)',
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_ignition.bin',
'<(embed_script)',
],
},
],
}],
],
'dependencies': [
'v8_base',
......
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