Skip to content

Commit

Permalink
Revert of Add cloud_print to the GN build. (patchset chromium#5 id:80…
Browse files Browse the repository at this point in the history
…001 of https://codereview.chromium.org/1393123003/ )

Reason for revert:
Broke http://build.chromium.org/p/chromium.win/builders/Win%20x64%20Builder%20%28dbg%29/builds/14017

Original issue's description:
> Add cloud_print to the GN build.
>
> There were some existing cloud_print targets that were hooked up only on Linux, but most of the code was Windows-only. This adds the missing targets and should bring us up to GYP parity.
>
> Fix the cloud print size_t to int warnings and remove the warning disable from GYP.
>
> Move generated resources file from cloud_print/resources.h to cloud_print/service/resources.h to match where the source file is.
>
> Cloud print does some messy things to get the content switches constants, including the file directly in its sources and manually setting LINK_CONTENT_STATICALLY for all targets. In GN, this adds a static_switches target in content that does this in an official way.
>
> Committed: https://crrev.com/53eae14bacb401632d4f2045ed8715705dcd8d1d
> Cr-Commit-Position: refs/heads/master@{#353928}

[email protected],[email protected]
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#353938}
  • Loading branch information
nico authored and Commit bot committed Oct 14, 2015
1 parent 79e506a commit 515fe9b
Show file tree
Hide file tree
Showing 25 changed files with 38 additions and 475 deletions.
3 changes: 1 addition & 2 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ check_targets = [
# TODO(brettw): Fix http://crbug.com/460828 and uncomment the following
# line.
#"//chrome_elf/*",
#"//cloud_print/*",
"//cloud_print/*",

#"//components/*", # Lots of errors.
"//components/app_modal/*",
Expand Down Expand Up @@ -63,7 +63,6 @@ check_targets = [

#"//content/*", # A whole lot of errors.
"//content/public/common:result_codes",
"//content/public/common:static_switches",
"//courgette/*",
"//crypto/*",
"//data/*",
Expand Down
2 changes: 0 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,6 @@ group("both_gn_and_gyp") {
"//chrome/installer/setup:setup_unittests",
"//chrome_elf:chrome_elf_unittests",
"//chrome_elf:dll_hash_main",
"//cloud_print/service/win:cloud_print_service",
"//cloud_print:cloud_print_unittests",
"//components/crash/content/tools:crash_service",
"//components/wifi:wifi_test",
"//net:quic_client",
Expand Down
4 changes: 0 additions & 4 deletions build/config/win/manifest.gni
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ common_controls_manifest = "//build/win/common_controls.manifest"
# request elevated privileges from the user. This is normally what you want.
as_invoker_manifest = "//build/win/as_invoker.manifest"

# An alternative to as_invoker_manifest when you want the application to always
# elevate.
require_administrator_manifest = "//build/win/require_administrator.manifest"

# Construct a target to combine the given manifest files into a .rc file.
#
# Variables for the windows_manifest template:
Expand Down
10 changes: 5 additions & 5 deletions build/gn_migration.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,6 @@
'../chrome/installer/mini_installer.gyp:mini_installer',
'../chrome_elf/chrome_elf.gyp:chrome_elf_unittests',
'../chrome_elf/chrome_elf.gyp:dll_hash_main',
'../cloud_print/service/win/service.gyp:cloud_print_service',
'../cloud_print/service/win/service.gyp:cloud_print_service_config',
'../cloud_print/service/win/service.gyp:cloud_print_service_setup',
'../cloud_print/virtual_driver/win/install/virtual_driver_install.gyp:virtual_driver_setup',
'../cloud_print/virtual_driver/win/virtual_driver.gyp:gcp_portmon',
'../components/components.gyp:wifi_test',
'../net/net.gyp:quic_client',
'../net/net.gyp:quic_server',
Expand Down Expand Up @@ -678,6 +673,11 @@

'../cloud_print/gcp20/prototype/gcp20_device.gyp:gcp20_device',
'../cloud_print/gcp20/prototype/gcp20_device.gyp:gcp20_device_unittests',
'../cloud_print/service/win/service.gyp:cloud_print_service',
'../cloud_print/service/win/service.gyp:cloud_print_service_config',
'../cloud_print/service/win/service.gyp:cloud_print_service_setup',
'../cloud_print/virtual_driver/win/install/virtual_driver_install.gyp:virtual_driver_setup',
'../cloud_print/virtual_driver/win/virtual_driver.gyp:gcp_portmon',
'../components/test_runner/test_runner.gyp:layout_test_helper',
'../content/content_shell_and_tests.gyp:content_shell_crash_service',
'../gpu/gpu.gyp:angle_end2end_tests',
Expand Down
9 changes: 0 additions & 9 deletions build/win/require_administrator.manifest

This file was deleted.

3 changes: 0 additions & 3 deletions chrome/version_resource_rules.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

# This file defines rules that allow you to generate version resources for
# Windows images.
#
# GN: Use the "process_version" template in //chrome/version.gni.
# For an example, see the target //chrome:chrome_exe_version

# Include 'version.gypi' at the top of your GYP file to define
# the required variables:
Expand Down
38 changes: 10 additions & 28 deletions cloud_print/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@

import("//testing/test.gni")

group("cloud_print") {
if (is_win) {
public_deps = [
"//cloud_print/service/win:cloud_print_service",
"//cloud_print/service/win:cloud_print_service_config",
"//cloud_print/service/win:cloud_print_service_setup",
"//cloud_print/virtual_driver/win/install:virtual_driver_setup",
"//cloud_print/virtual_driver/win/port_monitor",
]

# When compiling 32-bit, also reference the 64-bit driver for installing on
# 64-bit systems.
if (target_cpu == "x86" && current_cpu == "x86") {
# TODO(brettw) enable this when Windows cross-compiles are set up.
# public_deps += [ "//cloud_print/virtual_driver/win/port_monitor(//build/toolchain/win:x64)" ]
}
}
}

test("cloud_print_unittests") {
sources = [
"service/service_state_unittest.cc",
Expand All @@ -31,17 +12,18 @@ test("cloud_print_unittests") {
deps = [
"//base",
"//base/test:run_all_unittests",
"//cloud_print/service:lib",
"//cloud_print/service:cloud_print_service_lib",
"//testing/gmock",
"//testing/gtest",
]

if (is_win) {
sources += [
"service/win/service_ipc_unittest.cc",
"virtual_driver/win/port_monitor/port_monitor_unittest.cc",
]
deps += [ "//cloud_print/virtual_driver/win/port_monitor:lib" ]
libs = [ "secur32.lib" ]
}
# TODO(GYP)
# if (is_win) {
# sources += [
# "service/win/service_ipc_unittest.cc",
# "virtual_driver/win/port_monitor/port_monitor_unittest.cc",
# ]
#
# deps += [ "virtual_driver/win:gcp_portmon_lib" ]
#}
}
2 changes: 0 additions & 2 deletions cloud_print/cloud_print.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
},
'targets': [
{
# GN version: //cloud_print
'target_name': 'cloud_print',
'type': 'none',
'dependencies': [
Expand All @@ -30,7 +29,6 @@
],
},
{
# GN version: //cloud_print:cloud_print_unittests
'target_name': 'cloud_print_unittests',
'type': 'executable',
'sources': [
Expand Down
3 changes: 0 additions & 3 deletions cloud_print/cloud_print_resources.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
],
'targets': [
{
# GN: Thes targets for this are split out depending on when the specific
# .ver file is used. For example, see:
# //cloud_print/sevice/win:exe_version
'target_name': 'cloud_print_version_resources',
'type': 'none',
'variables': {
Expand Down
26 changes: 0 additions & 26 deletions cloud_print/common/BUILD.gn

This file was deleted.

1 change: 0 additions & 1 deletion cloud_print/common/common.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
},
'targets': [
{
# GN version: //cloud_print/common:install_utils
'target_name': 'cloud_print_install_lib',
'type': 'static_library',
'dependencies': [
Expand Down
56 changes: 6 additions & 50 deletions cloud_print/service/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/features.gni")
import("//tools/grit/grit_rule.gni")

config("internal_config") {
defines = [
"SECURITY_WIN32",
"STRICT",
"_ATL_APARTMENT_THREADED",
"_ATL_CSTRING_EXPLICIT_CONSTRUCTORS",
"_ATL_NO_COM_SUPPORT",
"_ATL_NO_AUTOMATIC_NAMESPACE",
"_ATL_NO_EXCEPTIONS",
]
}

if (is_win && is_clang) {
# service_controller.h uses DECLARE_REGISTRY_APPID_RESOURCEID, which
# in msvs2013 returns string literals via a non-const pointer. So
# disable this warning for now.
# TODO(thakis): Remove this once we're on 2014,
# https://connect.microsoft.com/VisualStudio/feedback/details/806376/atl-hindrances-to-adopting-new-strictstrings-conformance-option-in-vs2013
config("service_warning_config") {
cflags = [ "-Wno-writable-strings" ]
}
}

source_set("lib") {
source_set("cloud_print_service_lib") {
sources = [
"//cloud_print/common/win/cloud_print_utils.cc",
"//cloud_print/common/win/cloud_print_utils.h",
"service_constants.cc",
"service_constants.h",
"service_state.cc",
Expand All @@ -50,46 +28,24 @@ source_set("lib") {
"win/setup_listener.h",
]

configs += [
":internal_config",
"//build/config/compiler:wexit_time_destructors",
]

deps = [
":resources",
":service_resources",
"//base",
"//base:base_static",
"//base/third_party/dynamic_annotations",
"//chrome/common:constants",
"//cloud_print/common",
"//components/cloud_devices/common",
"//content/public/common:static_switches",
"//content/public/common",
"//google_apis",
"//ipc",
"//net",
"//url",
]

if (enable_basic_printing || enable_print_preview) {
deps += [ "//printing" ]
}

if (is_win) {
deps += [
"//chrome/common:constants",
"//chrome/installer/launcher_support",
]
}

if (is_clang) {
cflags = [ "-Wno-parentheses" ]
if (is_win) {
public_configs = [ ":service_warning_config" ]
}
}
}

grit("resources") {
grit("service_resources") {
source = "win/service_resources.grd"
outputs = [
"resources.h",
Expand Down
10 changes: 7 additions & 3 deletions cloud_print/service/service.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@
'_ATL_NO_AUTOMATIC_NAMESPACE',
'_ATL_NO_EXCEPTIONS',
],
'conditions': [
['OS=="win"', {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
}],
],
},
'targets': [
{
# GN version: //cloud_print/service:resources
'target_name': 'service_resources',
'type': 'none',
'variables': {
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cloud_print/service',
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cloud_print',
},
'actions': [
{
Expand All @@ -43,7 +48,6 @@
'includes': [ '../../build/grit_target.gypi' ],
},
{
# GN version: //cloud_print/service
'target_name': 'cloud_print_service_lib',
'type': 'static_library',
'dependencies': [
Expand Down
Loading

0 comments on commit 515fe9b

Please sign in to comment.