summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-07-21 10:00:47 -0700
committerNico Weber <thakis@chromium.org>2015-07-21 17:02:40 +0000
commit13e350d3f0ff78bd0e6b96c83ffbd428d695acac (patch)
tree8b6575693f177f6e8ebc33054f2de8ea10564bbf
parent92f94f2028d3c226577930cb6df777f7f5edbbed (diff)
downloadchromium_src-13e350d3f0ff78bd0e6b96c83ffbd428d695acac.zip
chromium_src-13e350d3f0ff78bd0e6b96c83ffbd428d695acac.tar.gz
chromium_src-13e350d3f0ff78bd0e6b96c83ffbd428d695acac.tar.bz2
Revert "Preliminary support for Windows manifests in the GN build."
This reverts https://codereview.chromium.org/1240893004/ , it broke building remoting in the gyp build (see comment on the review). TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/1249723002. Cr-Commit-Position: refs/heads/master@{#339669}
-rw-r--r--build/config/win/manifest.gni182
-rw-r--r--build/win/BUILD.gn16
-rw-r--r--build/win/as_invoker.manifest9
-rw-r--r--cloud_print/service/win/common-controls.manifest (renamed from build/win/common_controls.manifest)0
-rw-r--r--cloud_print/service/win/service.gyp2
-rw-r--r--content/shell/BUILD.gn5
-rw-r--r--remoting/host/win/common-controls.manifest8
-rw-r--r--remoting/remoting_host_win.gypi2
-rw-r--r--testing/test.gni17
9 files changed, 17 insertions, 224 deletions
diff --git a/build/config/win/manifest.gni b/build/config/win/manifest.gni
deleted file mode 100644
index 8da784d..0000000
--- a/build/config/win/manifest.gni
+++ /dev/null
@@ -1,182 +0,0 @@
-# Copyright 2015 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.
-
-# HOW MANIFESTS WORK IN THE GN BUILD
-#
-# Use the windows_manifest template to declare a manifest generation step.
-# This will combine all listed .manifest files and generate a resource file
-# referencing the resulting manifest. To link this manifest, just depend on
-# the manifest target from your executable or shared library.
-#
-# This will define an empty placeholder target on non-Windows platforms so
-# the manifest declarations and dependencies do not need to be inside of OS
-# conditionals.
-#
-# Manifests uses different resource IDs for EXE and DLL targets. You will need
-# to specify this in the manifest target declaration and only use that manifest
-# target from the correct type of binary target.
-#
-# A binary can depend on only one manifest target, but the manifest target
-# can depend on many individual .manifest files which will be merged. As a
-# result, only executables and shared libraries should depend on manifest
-# targets. If you want to add a manifest to a component, put the dependency
-# behind a "if (is_component_build)" conditional.
-#
-# Generally you will just want the defaults for the Chrome build. In this case
-# the binary should just depend on one of the targets in //build/win/. There
-# are also individual manifest files in that directory you can reference via
-# the *_manifest variables defined below to pick and choose only some defaults.
-# You might combine these with a custom manifest file to get specific behavior.
-
-# Reference this manifest as a source from windows_manifest targets to get
-# the default Chrome OS compatibility list.
-default_compatibility_manifest = "//build/win/compatibility.manifest"
-
-# Reference this manifest as a source from windows_manifest targets to get
-# the default Chrome common constrols compatibility.
-common_controls_manifest = "//build/win/common_controls.manifest"
-
-# Reference this manifest to request that Windows not perform any elevation
-# when running your program. Otherwise, it might do some autodetection and
-# request elevated privileges from the user. This is normally what you want.
-as_invoker_manifest = "//build/win/as_invoker.manifest"
-
-# Construct a target to combine the given manifest files into a .rc file.
-#
-# Variables for the windows_manifest template:
-#
-# sources: (required)
-# List of source .manifest files to add.
-#
-# type: "dll" or "exe" (required)
-# Indicates the type of target that this manifest will be used for.
-# DLLs and EXEs have different manifest resource IDs.
-#
-# deps: (optional)
-# visibility: (optional)
-# Normal meaning.
-#
-# Example:
-#
-# windows_manifest("doom_melon_manifest") {
-# sources = [
-# "doom_melon.manifest", # Custom values in here.
-# default_compatibility_manifest, # Want the normal OS compat list.
-# ]
-# type = "exe"
-# }
-#
-# executable("doom_melon") {
-# deps = [ ":doom_melon_manifest" ]
-# ...
-# }
-
-if (is_win) {
- # This is the environment file that gyp-win-tool will use for the current
- # toolchain. It is placed in root_build_dir by the toolchain setup. This
- # variable is the path relative to the root_build_dir which is what
- # gyp-win-tool expects as an argument.
- _environment_file = "environment.$current_cpu"
-
- template("windows_manifest") {
- manifest_action_name = "${target_name}__gen_manifest"
- rc_action_name = "${target_name}__gen_rc"
- source_set_name = target_name
-
- output_manifest = "$target_gen_dir/$source_set_name.manifest"
- rcfile = "$output_manifest.rc"
-
- # Make the final .manifest file.
- action(manifest_action_name) {
- visibility = [ ":$source_set_name" ]
-
- script = "$root_build_dir/gyp-win-tool"
-
- assert(defined(invoker.sources),
- "\"sources\" must be defined for a windows_manifest target")
- inputs = invoker.sources
-
- outputs = [
- output_manifest,
- ]
-
- args = [
- "manifest-wrapper",
- _environment_file,
- "mt.exe",
- "-nologo",
- "-manifest",
- ]
- args += rebase_path(invoker.sources, root_build_dir)
- args += [ "-out:" + rebase_path(output_manifest, root_build_dir) ]
-
- # Apply any dependencies from the invoker to this target, since those
- # dependencies may have created the input manifest files.
- if (defined(invoker.deps)) {
- deps = invoker.deps
- }
- }
-
- # Make the .rc file that references the final manifest file. The manifest
- # generation doesn't need to be a dependency because it's not actually
- # needed until the .rc is compiled.
- #
- # This could easily be combined into one step, but this current separation
- # of .manifest and .rc matches GYP and allows us to re-use gyp-win-tool.
- action(rc_action_name) {
- visibility = [ ":$source_set_name" ]
-
- script = "$root_build_dir/gyp-win-tool"
-
- outputs = [
- rcfile,
- ]
-
- # EXEs have a resource ID of 1 for their manifest, DLLs use 2.
- assert(defined(invoker.type),
- "\"type\" must be defined for a windows_manifest")
- if (invoker.type == "exe") {
- manifest_resource_id = "1"
- } else if (invoker.type == "dll") {
- manifest_resource_id = "2"
- } else {
- assert(false, "Bad value of \"type\", Must be \"exe\" or \"dll\"")
- }
-
- args = [
- "manifest-to-rc",
- "$_environment_file",
- rebase_path(output_manifest),
- rebase_path(rcfile, root_build_dir),
- manifest_resource_id,
- ]
- }
-
- # This source set only exists to compile and link the resource file.
- source_set(source_set_name) {
- if (defined(invoker.visibility)) {
- visibility = invoker.visibility
- }
- sources = [
- rcfile,
- ]
- deps = [
- ":$manifest_action_name",
- ":$rc_action_name",
- ]
- }
- }
-} else {
- # Make a no-op group on non-Windows platforms so windows_manifest
- # instantiations don't need to be inside windows blocks.
- template("windows_manifest") {
- group(target_name) {
- # Prevent unused variable warnings on non-Windows platforms.
- assert(invoker.type == "exe" || invoker.type == "dll")
- assert(invoker.sources != "")
- assert(!defined(invoker.deps) || invoker.deps != "")
- assert(!defined(invoker.visibility) || invoker.visibility != "")
- }
- }
-}
diff --git a/build/win/BUILD.gn b/build/win/BUILD.gn
deleted file mode 100644
index 466e7ee..0000000
--- a/build/win/BUILD.gn
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2015 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.
-
-import("//build/config/win/manifest.gni")
-
-# Depending on this target will cause the manifests for Chrome's default
-# Windows and common control compatibility and elevation for executables.
-windows_manifest("default_exe_manifest") {
- sources = [
- as_invoker_manifest,
- common_controls_manifest,
- default_compatibility_manifest,
- ]
- type = "exe"
-}
diff --git a/build/win/as_invoker.manifest b/build/win/as_invoker.manifest
deleted file mode 100644
index df046fd..0000000
--- a/build/win/as_invoker.manifest
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
- <security>
- <requestedPrivileges>
- <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
- </requestedPrivileges>
- </security>
-</trustInfo></assembly>
diff --git a/build/win/common_controls.manifest b/cloud_print/service/win/common-controls.manifest
index 1710196..1710196 100644
--- a/build/win/common_controls.manifest
+++ b/cloud_print/service/win/common-controls.manifest
diff --git a/cloud_print/service/win/service.gyp b/cloud_print/service/win/service.gyp
index 29aa3cf..0019b6f 100644
--- a/cloud_print/service/win/service.gyp
+++ b/cloud_print/service/win/service.gyp
@@ -68,7 +68,7 @@
'msvs_settings': {
'VCManifestTool': {
'AdditionalManifestFiles': [
- '<(DEPTH)/build/win/common_controls.manifest',
+ 'common-controls.manifest',
],
},
'VCLinkerTool': {
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn
index 661b33b..a79f48c 100644
--- a/content/shell/BUILD.gn
+++ b/content/shell/BUILD.gn
@@ -4,7 +4,6 @@
import("//build/config/features.gni")
import("//build/config/ui.gni")
-import("//build/config/win/manifest.gni")
import("//tools/grit/repack.gni")
import("//tools/grit/grit_rule.gni")
if (is_android) {
@@ -395,13 +394,12 @@ repack("pak") {
# TODO(GYP): Figure out what this should be on android
# and make linking this work on the Mac.
if (!is_android && !is_mac) {
- # TODO(brettw) when GYP is no longer necessary, delete
- # content/shell/app/shell.exe.manifest. This file is not used in GN.
executable("content_shell") {
testonly = true
# TODO(GYP) mac resource bundle stuff for this target.
# TODO(GYP) Windows content shell settings:
+ # - Manifest.
# - RC file.
# - 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
sources = [
@@ -412,7 +410,6 @@ if (!is_android && !is_mac) {
":content_shell_lib",
":pak",
"//base/allocator",
- "//build/win:default_exe_manifest",
]
if (is_win) {
diff --git a/remoting/host/win/common-controls.manifest b/remoting/host/win/common-controls.manifest
new file mode 100644
index 0000000..1710196
--- /dev/null
+++ b/remoting/host/win/common-controls.manifest
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
diff --git a/remoting/remoting_host_win.gypi b/remoting/remoting_host_win.gypi
index 2374041..9c0b3e9 100644
--- a/remoting/remoting_host_win.gypi
+++ b/remoting/remoting_host_win.gypi
@@ -240,7 +240,7 @@
'VCManifestTool': {
'EmbedManifest': 'true',
'AdditionalManifestFiles': [
- '<(DEPTH)/build/win/common_controls.manifest',
+ 'host/win/common-controls.manifest',
],
},
'VCLinkerTool': {
diff --git a/testing/test.gni b/testing/test.gni
index a224ef2..c99df90 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -203,20 +203,15 @@ template("test") {
defines = invoker.defines
}
+ # All shared libraries must have the sanitizer deps to properly link in
+ # asan mode (this target will be empty in other cases).
if (defined(invoker.deps)) {
- deps = invoker.deps
+ deps = invoker.deps + [ "//build/config/sanitizers:deps" ]
} else {
- deps = []
+ deps = [
+ "//build/config/sanitizers:deps",
+ ]
}
- deps += [
- # All shared libraries must have the sanitizer deps to properly link in
- # asan mode (this target will be empty in other cases).
- "//build/config/sanitizers:deps",
-
- # Give tests the default manifest on Windows (a no-op elsewhere).
- "//build/win:default_exe_manifest",
- ]
-
if (defined(invoker.direct_dependent_configs)) {
direct_dependent_configs = invoker.direct_dependent_configs
}