Commit c32d5621 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Include snapshot_blob.bin in mini_installer.exe when needed

It's needed in builds that don't set use_v8_context_snapshot,
such as when cross-compiling from Linux to Windows. The gn file
already lists snapshot_blob.bin as a dependency in that case,
but it never actually made it into the installer.

Since the file is usually always built, this puts it in a section
of chrome.release that's only included conditionally.

Bug: 803591,858874
Change-Id: I26de080231ced9812110d9524dcec990bf3bbee4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1844991Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704559}
parent 9e04ac77
......@@ -226,6 +226,7 @@ template("generate_mini_installer") {
deps += [ "//tools/v8_context_snapshot" ]
} else {
inputs += [ "$root_out_dir/snapshot_blob.bin" ]
args += [ "--include_snapshotblob=1" ]
}
}
......
......@@ -91,3 +91,9 @@ WidevineCdm\_platform_specific\win_x86\widevinecdm.dll: %(VersionDir)s\WidevineC
WidevineCdm\_platform_specific\win_x86\widevinecdm.dll.sig: %(VersionDir)s\WidevineCdm\_platform_specific\win_x86\
WidevineCdm\_platform_specific\win_x64\widevinecdm.dll: %(VersionDir)s\WidevineCdm\_platform_specific\win_x64\
WidevineCdm\_platform_specific\win_x64\widevinecdm.dll.sig: %(VersionDir)s\WidevineCdm\_platform_specific\win_x64\
[SNAPSHOTBLOB]
# The snapshot_blob.bin V8 snapshot is needed in builds that don't use
# v8_context_snapshot.bin, such as Linux-Windows cross-builds.
# It has its own section here so that it's only included when necessary.
snapshot_blob.bin: %(VersionDir)s\
......@@ -94,7 +94,7 @@ def CompressUsingLZMA(build_dir, compressed_file, input_file, verbose):
def CopyAllFilesToStagingDir(config, distribution, staging_dir, build_dir,
enable_hidpi):
enable_hidpi, include_snapshotblob):
"""Copies the files required for installer archive.
Copies all common files required for various distributions of Chromium and
also files for the specific Chromium build specified by distribution.
......@@ -111,6 +111,9 @@ def CopyAllFilesToStagingDir(config, distribution, staging_dir, build_dir,
if enable_hidpi == '1':
CopySectionFilesToStagingDir(config, 'HIDPI', staging_dir, build_dir)
if include_snapshotblob == '1':
CopySectionFilesToStagingDir(config, 'SNAPSHOTBLOB', staging_dir, build_dir)
def CopySectionFilesToStagingDir(config, section, staging_dir, src_dir):
"""Copies installer archive files specified in section from src_dir to
......@@ -516,7 +519,8 @@ def main(options):
# Copy the files from the build dir.
CopyAllFilesToStagingDir(config, options.distribution,
staging_dir, options.build_dir,
options.enable_hidpi)
options.enable_hidpi,
options.include_snapshotblob)
if options.component_build == '1':
DoComponentBuildTasks(staging_dir, options.build_dir,
......@@ -577,6 +581,8 @@ def _ParseOptions():
help='Name used to prefix names of generated archives.')
parser.add_option('--enable_hidpi', default='0',
help='Whether to include HiDPI resource files.')
parser.add_option('--include_snapshotblob', default='0',
help='Whether to include the V8 snapshot blob.')
parser.add_option('--component_build', default='0',
help='Whether this archive is packaging a component build.')
parser.add_option('--skip_archive_compression',
......
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