Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6390)

Unified Diff: chrome/installer/mini_installer/BUILD.gn

Issue 2091023007: Add the mini_installer_syzygy GN target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework location of is_win_fastlink, fix full_wpo_on_official while I'm at it Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/win/visual_studio_version.gni ('k') | chrome/tools/build/win/syzygy/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mini_installer/BUILD.gn
diff --git a/chrome/installer/mini_installer/BUILD.gn b/chrome/installer/mini_installer/BUILD.gn
index 8f8cb406fb7a16dee6a0727b3525d83acc2aa740..a5f9c71081dfc568542f1b0b62d6d8c55f048cf5 100644
--- a/chrome/installer/mini_installer/BUILD.gn
+++ b/chrome/installer/mini_installer/BUILD.gn
@@ -2,8 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
+import("//build/config/win/visual_studio_version.gni")
import("//build_overrides/v8.gni")
import("//chrome/test/mini_installer/mini_installer_test.gni")
import("//chrome/version.gni")
@@ -72,8 +74,6 @@ source_set("unit_tests") {
]
}
-packed_files_rc_file = "$target_gen_dir/packed_files.rc"
-
# The runtime deps are used to tell create_installer_archive what component
# DLLs need to be packaged in a component build.
chrome_runtime_deps = "$root_gen_dir/chrome_component.runtime_deps"
@@ -93,145 +93,176 @@ group("setup_runtime_deps") {
]
}
-action("archive") {
- script = "//chrome/tools/build/win/create_installer_archive.py"
+# Generates a mini installer.
+#
+# out_dir (required)
+# The output directory out_dir where the mini_installer image should be
+# written.
+#
+# deps (required)
+# Normal meaning.
+template("generate_mini_installer") {
+ custom_deps = invoker.deps
+ output_dir = invoker.out_dir
- release_file = "chrome.release"
+ packed_files_rc_file = "$target_gen_dir/$target_name/packed_files.rc"
+ archive_name = target_name + "_archive"
+ staging_dir = "$target_gen_dir/$target_name"
- inputs = [
- "$root_out_dir/chrome.exe",
- "$root_out_dir/chrome.dll",
- "$root_out_dir/locales/en-US.pak",
- "$root_out_dir/setup.exe",
- release_file,
- ]
+ action(archive_name) {
+ script = "//chrome/tools/build/win/create_installer_archive.py"
- outputs = [
- # See also chrome.packed.7z conditionally added below.
- "$root_out_dir/chrome.7z",
- "$root_out_dir/setup.ex_",
- packed_files_rc_file,
- ]
- args = [
- "--build_dir",
- rebase_path(root_out_dir, root_build_dir),
- "--staging_dir",
- rebase_path(root_gen_dir, root_build_dir),
- "--input_file",
- rebase_path(release_file, root_build_dir),
- "--resource_file_path",
- rebase_path(packed_files_rc_file, root_build_dir),
- "--target_arch=$current_cpu",
- "--distribution=_google_chrome",
- "--chrome_runtime_deps",
- rebase_path(chrome_runtime_deps, root_build_dir),
- "--setup_runtime_deps",
- rebase_path(setup_runtime_deps, root_build_dir),
-
- # Optional arguments to generate diff installer.
- #'--last_chrome_installer=C:/Temp/base',
- #'--setup_exe_format=DIFF',
- #'--diff_algorithm=COURGETTE',
-
- # Optional argument for verbose archiving output.
- #'--verbose',
- ]
+ release_file = "chrome.release"
- deps = [
- ":chrome_runtime_deps",
- ":setup_runtime_deps",
- "//chrome",
- "//chrome:main_dll",
- "//chrome/browser/extensions/default_extensions",
- "//chrome/installer/setup",
- "//third_party/icu:icudata",
- ]
+ inputs = [
+ "$output_dir/chrome.dll",
+ "$root_out_dir/chrome.exe",
+ "$root_out_dir/locales/en-US.pak",
+ "$root_out_dir/setup.exe",
+ release_file,
+ ]
- if (enable_hidpi) {
- args += [ "--enable_hidpi=1" ]
- }
- if (is_component_build) {
- args += [ "--component_build=1" ]
- } else {
- outputs += [ "$root_out_dir/chrome.packed.7z" ]
- }
+ outputs = [
+ # See also chrome.packed.7z conditionally added below.
+ "$output_dir/chrome.7z",
+ "$output_dir/setup.ex_",
+ packed_files_rc_file,
+ ]
+ args = [
+ "--build_dir",
+ rebase_path(root_out_dir, root_build_dir),
+ "--staging_dir",
+ rebase_path(staging_dir, root_build_dir),
+ "--input_file",
+ rebase_path(release_file, root_build_dir),
+ "--resource_file_path",
+ rebase_path(packed_files_rc_file, root_build_dir),
+ "--target_arch=$current_cpu",
+ "--distribution=_google_chrome",
+ "--output_dir",
+ rebase_path(output_dir, root_build_dir),
+ "--chrome_runtime_deps",
+ rebase_path(chrome_runtime_deps, root_build_dir),
+ "--setup_runtime_deps",
+ rebase_path(setup_runtime_deps, root_build_dir),
+
+ # Optional arguments to generate diff installer.
+ #'--last_chrome_installer=C:/Temp/base',
+ #'--setup_exe_format=DIFF',
+ #'--diff_algorithm=COURGETTE',
+
+ # Optional argument for verbose archiving output.
+ #'--verbose',
+ ]
+
+ deps = custom_deps + [
+ ":chrome_runtime_deps",
+ ":setup_runtime_deps",
+ "//chrome",
+ "//chrome/browser/extensions/default_extensions",
+ "//chrome/installer/setup",
+ "//third_party/icu:icudata",
+ ]
+
+ if (enable_hidpi) {
+ args += [ "--enable_hidpi=1" ]
+ }
+ if (is_component_build) {
+ args += [ "--component_build=1" ]
+ } else {
+ outputs += [ "$output_dir/chrome.packed.7z" ]
+ }
+
+ if (enable_nacl) {
+ inputs += [ "$root_out_dir/nacl_irt_x86_64.nexe" ]
+ deps += [ "//ppapi/native_client:irt" ]
+ if (current_cpu == "x86") {
+ inputs += [
+ "$root_out_dir/nacl64.exe",
+ "$root_out_dir/nacl_irt_x86_32.nexe",
+ ]
+ deps += [ "//components/nacl/broker:nacl64" ]
+ }
+ }
+
+ if (icu_use_data_file) {
+ inputs += [ "$root_out_dir/icudtl.dat" ]
+ } else {
+ inputs += [ "$root_out_dir/icudt.dll" ]
+ }
- if (enable_nacl) {
- inputs += [ "$root_out_dir/nacl_irt_x86_64.nexe" ]
- deps += [ "//ppapi/native_client:irt" ]
- if (current_cpu == "x86") {
+ if (v8_use_external_startup_data) {
inputs += [
- "$root_out_dir/nacl64.exe",
- "$root_out_dir/nacl_irt_x86_32.nexe",
+ "$root_out_dir/natives_blob.bin",
+ "$root_out_dir/snapshot_blob.bin",
]
- deps += [ "//components/nacl/broker:nacl64" ]
+ deps += [ "//v8" ]
}
- }
-
- if (icu_use_data_file) {
- inputs += [ "$root_out_dir/icudtl.dat" ]
- } else {
- inputs += [ "$root_out_dir/icudt.dll" ]
- }
- if (v8_use_external_startup_data) {
- inputs += [
- "$root_out_dir/natives_blob.bin",
- "$root_out_dir/snapshot_blob.bin",
+ depfile = "$target_gen_dir/archive.d"
+ args += [
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
]
- deps += [ "//v8" ]
}
- depfile = "$target_gen_dir/archive.d"
- args += [
- "--depfile",
- rebase_path(depfile, root_build_dir),
- ]
-}
+ executable(target_name) {
+ output_name = "mini_installer"
+ sources = [
+ "mini_installer.cc",
+ packed_files_rc_file,
+ ]
-executable("mini_installer") {
- sources = [
- "mini_installer.cc",
- packed_files_rc_file,
- ]
+ # This target is special so we manually override most linker flags and
+ # specify our own to keep the size down. Also make sure that we don't use
+ # WPO as it's not supported by the mini installer.
+ configs -= [
+ "//build/config/compiler:default_optimization",
+ "//build/config:executable_config",
+ "//build/config/win:console",
+ ]
+ configs += [
+ ":mini_installer_compiler_flags",
+ "//build/config/compiler:optimize_no_wpo",
+ "//build/config/win:sdk_link",
+ "//build/config/win:windowed",
+ ]
- # This target is special so we manually override most linker flags and
- # specify our own to keep the size down. Also make sure that we don't use
- # WPO as it's not supported by the mini installer.
- configs -= [
- "//build/config/compiler:default_optimization",
- "//build/config:executable_config",
- "//build/config/win:console",
- ]
- configs += [
- ":mini_installer_compiler_flags",
- "//build/config/win:sdk_link",
- "//build/config/win:windowed",
- ]
- if (!is_debug) {
- configs += [ "//build/config/compiler:optimize_no_wpo" ]
- } else {
- configs += [ "//build/config/compiler:no_optimize" ]
- }
+ ldflags = [
+ "/ENTRY:MainEntryPoint",
+ "/FIXED:NO",
+ "/ignore:4199",
+ "/NXCOMPAT",
+ ]
- ldflags = [
- "/ENTRY:MainEntryPoint",
- "/FIXED:NO",
- "/ignore:4199",
- "/NXCOMPAT",
- ]
+ libs = [ "setupapi.lib" ]
- libs = [ "setupapi.lib" ]
+ deps = [
+ ":$archive_name",
+ ":lib",
+ ":version",
+ "//build/config/sanitizers:deps",
+ "//build/win:default_exe_manifest",
+ ]
+ }
+}
+generate_mini_installer("mini_installer") {
+ out_dir = root_out_dir
deps = [
- ":archive",
- ":lib",
- ":version",
- "//build/config/sanitizers:deps",
- "//build/win:default_exe_manifest",
+ "//chrome:main_dll",
]
}
+if (syzygy_optimize) {
+ generate_mini_installer("mini_installer_syzygy") {
+ out_dir = "$root_out_dir/syzygy/"
+ deps = [
+ "//chrome/tools/build/win/syzygy:chrome_dll_syzygy",
+ ]
+ }
+}
+
# next_version_mini_installer.exe can't be generated in an x86 Debug component
# build because it requires too much memory.
if (!(is_component_build && is_debug && target_cpu == "x86")) {
« no previous file with comments | « build/config/win/visual_studio_version.gni ('k') | chrome/tools/build/win/syzygy/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698