Commit a0ad68e8 authored by sebmarchand's avatar sebmarchand Committed by Commit bot

Move the mini_installer_version rule to its own gyp file.

Having this rule defined in mini_installer.gypi cause the following
warning:

warning: multiple rules generate mini_installer_exe_version.rc. builds
involving this target will not be correct

This is because this .gypi gets included both by mini_installer.gyp and
by mini_installer_syzygy.gypi. So these 2 targets declare
'mini_installer_exe_version.rc' as one of their output, and for some
reason the _syzygy one win and becomes the owner of this file.
This creates the following dependencies (from bottom to top):

syzygy/chrome.dll.pdb
  stamp
    obj/chrome/chrome_dll_syzygy.actions_rules_copies.stamp
      stamp
        obj/chrome/installer/mini_installer_syzygy.actions_depends.stamp
          mini_installer_syzygy_target_mini_installer_version_71edb9637c223314ee6152f2a3daf553
            mini_installer_exe_version.rc
              rc
              stamp
                obj/chrome/installer/mini_installer.mini_installer_exe_version.res
                obj/chrome/installer/mini_installer.actions_rules_copies.stamp
                  link_embed
                  rc
                  cxx
                  cxx
                  cxx
                  cxx
                  rc
                  cxx
                  cxx
                  cxx
                  cxx
                    mini_installer.exe
                      stamp
                        obj/build/chrome_official_builder_no_unittests.actions_depends.stamp
                          stamp
                            obj/build/chrome_official_builder.actions_depends.stamp
                              chrome_official_builder

Equivalent to (-> = "depends on"):

chrome_official_builder -> mini_installer.exe -> mini_installer_exe_version.rc -> mini_installer_syzygy -> chrome_dll_syzygy

Having this kind of dependency between mini_installer and the syzygy target cause some
important build failures on the official builder.

Defining this target in a new gyp file (instead of in a gypi file) fix this redefinition issue
(i.e. both targets still depends on it but they don't define it).

TBR=gab@chromium.org, grt@chromium.org
BUG=581525

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

Cr-Commit-Position: refs/heads/master@{#371746}
parent 63f7a4e7
{ {
'variables': { 'variables': {
'chromium_code': 1, 'chromium_code': 1,
'version_py': '<(DEPTH)/build/util/version.py',
'version_path': '../../chrome/VERSION',
'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
'branding_dir': '../app/theme/<(branding_path_component)',
'msvs_use_common_release': 0, 'msvs_use_common_release': 0,
'msvs_use_common_linker_extras': 0, 'msvs_use_common_linker_extras': 0,
'mini_installer_internal_deps%': 0, 'mini_installer_internal_deps%': 0,
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
'../chrome.gyp:default_extensions', '../chrome.gyp:default_extensions',
'../chrome.gyp:setup', '../chrome.gyp:setup',
'installer_tools.gyp:test_installer_sentinel', 'installer_tools.gyp:test_installer_sentinel',
'mini_installer_version.gyp:mini_installer_version',
], ],
'include_dirs': [ 'include_dirs': [
'../..', '../..',
...@@ -25,6 +26,7 @@ ...@@ -25,6 +26,7 @@
], ],
'sources': [ 'sources': [
'<(INTERMEDIATE_DIR)/packed_files.rc', '<(INTERMEDIATE_DIR)/packed_files.rc',
'<(PRODUCT_DIR)/mini_installer_exe_version.rc',
'mini_installer/appid.h', 'mini_installer/appid.h',
'mini_installer/chrome.release', 'mini_installer/chrome.release',
'mini_installer/chrome_appid.cc', 'mini_installer/chrome_appid.cc',
...@@ -135,34 +137,6 @@ ...@@ -135,34 +137,6 @@
# TODO(yukawa): Enable the common compatibility manifest again. # TODO(yukawa): Enable the common compatibility manifest again.
'win_exe_compatibility_manifest': '', 'win_exe_compatibility_manifest': '',
}, },
'rules': [
{
'rule_name': 'mini_installer_version',
'extension': 'version',
'variables': {
'template_input_path': 'mini_installer/mini_installer_exe_version.rc.version',
},
'inputs': [
'<(template_input_path)',
'<(version_path)',
'<(lastchange_path)',
'<(branding_dir)/BRANDING',
],
'outputs': [
'<(PRODUCT_DIR)/mini_installer_exe_version.rc',
],
'action': [
'python', '<(version_py)',
'-f', '<(version_path)',
'-f', '<(lastchange_path)',
'-f', '<(branding_dir)/BRANDING',
'<(template_input_path)',
'<@(_outputs)',
],
'process_outputs_as_sources': 1,
'message': 'Generating version information'
},
],
'actions': [ 'actions': [
{ {
'action_name': 'installer_archive', 'action_name': 'installer_archive',
......
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'variables': { 'variables': {
'version_py': '<(DEPTH)/build/util/version.py',
'version_path': '<(DEPTH)/chrome/VERSION',
'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
'branding_dir': '../app/theme/<(branding_path_component)',
'msvs_use_common_release': 0, 'msvs_use_common_release': 0,
'msvs_use_common_linker_extras': 0, 'msvs_use_common_linker_extras': 0,
}, },
......
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
'version_py': '<(DEPTH)/build/util/version.py',
'version_path': '../../chrome/VERSION',
'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
'branding_dir': '../app/theme/<(branding_path_component)',
},
'conditions': [
['OS=="win"', {
'targets': [
{
'target_name': 'mini_installer_version',
'type': 'none',
'sources': [
'mini_installer/mini_installer_exe_version.rc.version',
],
'rules': [
{
'rule_name': 'mini_installer_version',
'extension': 'version',
'variables': {
'template_input_path': 'mini_installer/mini_installer_exe_version.rc.version',
},
'inputs': [
'<(template_input_path)',
'<(version_path)',
'<(lastchange_path)',
'<(branding_dir)/BRANDING',
],
'outputs': [
'<(PRODUCT_DIR)/mini_installer_exe_version.rc',
],
'action': [
'python', '<(version_py)',
'-f', '<(version_path)',
'-f', '<(lastchange_path)',
'-f', '<(branding_dir)/BRANDING',
'<(template_input_path)',
'<@(_outputs)',
],
'process_outputs_as_sources': 1,
'message': 'Generating version information'
},
],
}],
}],
],
}
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