Skip to content

Commit

Permalink
Revert of Make chrome/common pass "gn check" (patchset chromium#8 id:…
Browse files Browse the repository at this point in the history
…140001 of https://codereview.chromium.org/1393953003/ )

Reason for revert:
Causes compile failure on the official builder: Google Chrome Linux x64
https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Linux%20x64/builds/4921

[4392/21662] CXX obj/v8/v8_base/bytecode-generator.o
FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/third_party/mozilla_security_manager/mozilla_security_manager/nsNSSCertHelper.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_OPENSSL=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_CONFIGURATION_POLICY -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_HIDPI=1 -DENABLE_TOPCHROME_MD=1 -DUSE_PROPRIETARY_CODECS -DV8_USE_EXTERNAL_STARTUP_DATA -DENABLE_BACKGROUND=1 -DENABLE_PRE_SYNC_BACKUP -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DOFFICIAL_BUILD -DGOOGLE_CHROME_BUILD -DENABLE_MEDIA_ROUTER=1 -DCR_CLANG_REVISION=247874-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -I../.. -Igen -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/nss -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/nspr -I../../third_party/boringssl/src/include -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -pthread -m64 -march=x86-64 -Wall -Wsign-compare -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-char-subscripts -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-reserved-user-defined-literal -Wno-shift-negative-value -Wno-bitfield-width -O2 -fno-ident -fdata-sections -ffunction-sections -g2 --sysroot=/b/build/slave/google-chrome-rel-linux_64/build/src/build/linux/debian_wheezy_amd64-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Wno-header-guard -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp -o obj/chrome/third_party/mozilla_security_manager/mozilla_security_manager/nsNSSCertHelper.o
../../chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp:55:10: fatal error: 'chrome/grit/generated_resources.h' file not found
#include "chrome/grit/generated_resources.h"
         ^
1 error generated.
FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/third_party/mozilla_security_manager/mozilla_security_manager/nsUsageArrayHelper.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_OPENSSL=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_CONFIGURATION_POLICY -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_HIDPI=1 -DENABLE_TOPCHROME_MD=1 -DUSE_PROPRIETARY_CODECS -DV8_USE_EXTERNAL_STARTUP_DATA -DENABLE_BACKGROUND=1 -DENABLE_PRE_SYNC_BACKUP -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DOFFICIAL_BUILD -DGOOGLE_CHROME_BUILD -DENABLE_MEDIA_ROUTER=1 -DCR_CLANG_REVISION=247874-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -I../.. -Igen -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/nss -I../../build/linux/debian_wheezy_amd64-sysroot/usr/include/nspr -I../../third_party/boringssl/src/include -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -pthread -m64 -march=x86-64 -Wall -Wsign-compare -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-char-subscripts -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-reserved-user-defined-literal -Wno-shift-negative-value -Wno-bitfield-width -O2 -fno-ident -fdata-sections -ffunction-sections -g2 --sysroot=/b/build/slave/google-chrome-rel-linux_64/build/src/build/linux/debian_wheezy_amd64-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Wno-header-guard -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.cpp -o obj/chrome/third_party/mozilla_security_manager/mozilla_security_manager/nsUsageArrayHelper.o
../../chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.cpp:40:10: fatal error: 'chrome/grit/generated_resources.h' file not found
#include "chrome/grit/generated_resources.h"
         ^
1 error generated.

Original issue's description:
> Make chrome/common pass "gn check"
>
> This adds some dependencies and marks them all public. Since chrome/common doesn't have much of an API or structure, deciding what should be public or not is basically impossible.
>
> Removes the include of content_switches from chrome_switches. Files depending on this have already been updated to include content_switches directly.
>
> Moves the nss_security_manager code out of chrome_browser. This was used only by chrome_common. In GYP This is now part of chrome_common_net. In GN, this is a separate target that chrome_common_net depends on.
>
> Committed: https://crrev.com/fdb7f7fa8b32547063721d66e504bbabd804a574
> Cr-Commit-Position: refs/heads/master@{#354132}

TBR=dpranke@chromium.org,brettw@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#354144}
  • Loading branch information
mpearson authored and Commit bot committed Oct 14, 2015
1 parent 5628304 commit 5af9024
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 89 deletions.
1 change: 0 additions & 1 deletion .gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ check_targets = [
"//cc/*",

#"//chrome/*", # Epic number of errors.
"//chrome/common/*",
"//chrome/installer/*",
"//chromecast/*",

Expand Down
6 changes: 6 additions & 0 deletions chrome/chrome_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,12 @@
'browser/net/nss_context.h',
'browser/net/nss_context_chromeos.cc',
'browser/net/nss_context_linux.cc',
'third_party/mozilla_security_manager/nsNSSCertHelper.cpp',
'third_party/mozilla_security_manager/nsNSSCertHelper.h',
'third_party/mozilla_security_manager/nsNSSCertificate.cpp',
'third_party/mozilla_security_manager/nsNSSCertificate.h',
'third_party/mozilla_security_manager/nsUsageArrayHelper.cpp',
'third_party/mozilla_security_manager/nsUsageArrayHelper.h',
],
'chrome_browser_password_manager_sources': [
'browser/password_manager/chrome_password_manager_client.cc',
Expand Down
9 changes: 0 additions & 9 deletions chrome/chrome_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -595,15 +595,6 @@
],
}],
['use_nss_certs == 1', {
'sources': [
# GN version: //chrome/third_party/mozilla_security_manager
'third_party/mozilla_security_manager/nsNSSCertHelper.cpp',
'third_party/mozilla_security_manager/nsNSSCertHelper.h',
'third_party/mozilla_security_manager/nsNSSCertificate.cpp',
'third_party/mozilla_security_manager/nsNSSCertificate.h',
'third_party/mozilla_security_manager/nsUsageArrayHelper.cpp',
'third_party/mozilla_security_manager/nsUsageArrayHelper.h',
],
'dependencies': [
'../build/linux/system.gyp:ssl',
],
Expand Down
53 changes: 19 additions & 34 deletions chrome/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,23 @@ static_library("common") {
]

public_deps = [
"//chrome/common:constants",
"//chrome/common/safe_browsing:proto",
]
deps = [
"//base:base",
"//base:i18n",
"//base:prefs",
"//base:base_static",
"//chrome:resources",
"//chrome:strings",
"//chrome/app/theme:theme_resources",
"//chrome/common:constants",
"//chrome/common/safe_browsing:proto",
"//chrome/common/variations:fieldtrial_testing_config",
"//chrome/installer/util",
"//components/cloud_devices/common",
"//components/component_updater",
"//components/content_settings/core/common",
"//components/crash/core/common",
"//components/data_reduction_proxy/content/common",
"//components/dom_distiller/core",
"//components/error_page/common",
"//components/favicon_base",
"//components/gcm_driver/common",
"//components/json_schema",
Expand All @@ -80,20 +79,10 @@ static_library("common") {
"//content/public/common",
"//crypto",
"//extensions/common:common_constants",
"//gin",
"//google_apis",
"//gpu/command_buffer/service",
"//gpu/config",
"//net",
"//ppapi/shared_impl",
"//skia",
"//third_party/icu",
"//third_party/zlib:zip",
"//ui/accessibility",
"//ui/base",
"//ui/gfx/ipc",
"//ui/gl",
"//ui/message_center",
"//ui/resources:resources",
"//url",
]
Expand All @@ -109,9 +98,8 @@ static_library("common") {
]
} else {
# Non-iOS.
public_deps += [
deps += [
":mojo_bindings",
"//chrome/common/net",
"//components/visitedlink/common",
"//components/autofill/content/common",
"//components/autofill/core/common",
Expand All @@ -122,26 +110,26 @@ static_library("common") {
"//media",
"//ipc",
"//third_party/re2",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/widevine/cdm:version_h",
]
public_deps += [
"//chrome/common/net",
"//third_party/mojo/src/mojo/public/cpp/bindings",
]
}

if (enable_extensions) {
sources += rebase_path(gypi_values.chrome_common_extensions_sources,
".",
"//chrome")
public_deps += [
deps += [
"//device/usb",
"//chrome/common/extensions/api",
"//extensions/common",
"//extensions/common/api",
"//extensions:extensions_resources",
"//extensions/strings",
"//media/cast:net",

# This dependency is for a header used only by extensions code.
"//ui/keyboard:keyboard_with_content",
]
if (is_chromeos) {
sources +=
Expand All @@ -154,32 +142,29 @@ static_library("common") {
if (is_win || is_mac) {
sources +=
rebase_path(gypi_values.chrome_common_win_mac_sources, ".", "//chrome")
public_deps += [ "//breakpad:client" ]
deps += [ "//breakpad:client" ]
}
if (is_win || is_mac || is_chromeos) {
sources += rebase_path(gypi_values.chrome_common_networking_private_sources,
".",
"//chrome")

# networking_private_crypto.cc depends on boringssl.
public_deps += [ "//third_party/boringssl" ]
deps += [ "//third_party/boringssl" ]
}
if (is_mac) {
sources +=
rebase_path(gypi_values.chrome_common_mac_sources, ".", "//chrome")
public_deps += [ ":app_mode_app_support" ]
}
if (is_chromeos) {
public_deps += [ "//chromeos" ]
deps += [ ":app_mode_app_support" ]
}

if (enable_nacl) {
public_deps += [ "//components/nacl:nacl_common" ]
deps += [ "//components/nacl:nacl_common" ]
}

# Printing.
if (enable_basic_printing || enable_print_preview) {
public_deps += [
deps += [
"//components/printing/common",
"//printing",
]
Expand Down Expand Up @@ -222,7 +207,7 @@ static_library("common") {
}

if (is_win) {
public_deps += [
deps += [
"//components/dom_distiller/core", # Needed by chrome_content_client.cc.
"//third_party/wtl",
]
Expand All @@ -234,7 +219,7 @@ static_library("common") {

if (is_mac) {
sources -= [ "channel_info_posix.cc" ]
public_deps += [
deps += [
"//third_party/mach_override",
"//third_party/google_toolbox_for_mac",
]
Expand All @@ -247,7 +232,7 @@ static_library("common") {
"ppapi_utils.cc",
"ppapi_utils.h",
]
public_deps += [ "//third_party/adobe/flash:flapper_version_h" ]
deps += [ "//third_party/adobe/flash:flapper_version_h" ]
}
if (enable_plugins && enable_extensions) {
sources += [
Expand All @@ -259,7 +244,7 @@ static_library("common") {
sources -= [ "media/webrtc_logging_messages.h" ]
}
if (enable_configuration_policy) {
public_deps += [ "//components/policy" ]
deps += [ "//components/policy" ]
}

if (safe_browsing_mode == 1) {
Expand Down
2 changes: 1 addition & 1 deletion chrome/common/chrome_content_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

#if defined(ENABLE_PLUGINS)
#include "content/public/common/pepper_plugin_info.h"
#include "flapper_version.h" // nogncheck In SHARED_INTERMEDIATE_DIR.
#include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
#include "ppapi/shared_impl/ppapi_permissions.h"
#endif

Expand Down
1 change: 1 addition & 0 deletions chrome/common/chrome_paths_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "content/public/common/content_switches.h"

namespace chrome {

Expand Down
4 changes: 4 additions & 0 deletions chrome/common/chrome_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// Don't add more switch files here. This is linked into some places like the
// installer where dependencies should be limited. Instead, have files
// directly include your switch file.
//
// TODO(brettw) delete content_switches.h include and make callers include that
// file manually if they need a content switch.
#include "content/public/common/content_switches.h"

namespace switches {

Expand Down
6 changes: 2 additions & 4 deletions chrome/common/crash_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@
#include "content/public/common/content_switches.h"
#include "ipc/ipc_switches.h"

// Breakpad dependencies exist only on Windows and Mac desktop. Exclude them
// from "gn check" to avoid failures on Linux (it doesn't understand ifdefs).
#if defined(OS_MACOSX)
#include "breakpad/src/common/simple_string_dictionary.h" // nogncheck
#include "breakpad/src/common/simple_string_dictionary.h"
#elif defined(OS_WIN)
#include "breakpad/src/client/windows/common/ipc_protocol.h" // nogncheck
#include "breakpad/src/client/windows/common/ipc_protocol.h"
#elif defined(OS_CHROMEOS)
#include "chrome/common/chrome_switches.h"
#include "gpu/command_buffer/service/gpu_switches.h"
Expand Down
6 changes: 1 addition & 5 deletions chrome/common/net/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ static_library("net") {

deps = [
"//base",
"//base:i18n",
"//chrome:resources",
"//chrome:strings",
"//components/url_formatter",
Expand All @@ -45,10 +44,7 @@ static_library("net") {
}

if (use_nss_certs) {
deps += [
"//chrome/third_party/mozilla_security_manager",
"//crypto:platform",
]
deps += [ "//crypto:platform" ]
} else {
sources -= [ "x509_certificate_model_nss.cc" ]
}
Expand Down
19 changes: 0 additions & 19 deletions chrome/third_party/mozilla_security_manager/BUILD.gn

This file was deleted.

12 changes: 6 additions & 6 deletions components/policy/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,35 @@ import("//tools/grit/grit_rule.gni")
# dependencies (GN will do the right thing without this extra target).
if (is_component_build) {
component("policy_component") {
public_deps = [
deps = [
"//components/policy/core/browser",
"//components/policy/core/common",
]
}
group("policy_component_browser") {
public_deps = [
deps = [
":policy_component",
]
}
group("policy_component_common") {
public_deps = [
deps = [
":policy_component",
]
}
} else { # Compile to separate libraries.
group("policy_component") {
public_deps = [
deps = [
":policy_component_browser",
":policy_component_common",
]
}
component("policy_component_browser") {
public_deps = [
deps = [
"//components/policy/core/browser",
]
}
component("policy_component_common") {
public_deps = [
deps = [
"//components/policy/core/common",
]
}
Expand Down
4 changes: 1 addition & 3 deletions extensions/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ if (enable_extensions) {
"//build/config/compiler:no_size_t_to_int_warning",
]

public_deps = [
deps = [
":common_constants",
":mojo",
]

deps = [
# TODO(benwells): figure out what to do with the api target and
# api resources compiled into the chrome resource bundle.
# http://crbug.com/162530
Expand Down
4 changes: 2 additions & 2 deletions extensions/common/api/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ mojom("mojom") {
}

# GYP version: extensions/common/api/api.gyp:extensions_api
group("api") {
public_deps = [
source_set("api") {
deps = [
":mojom",
":generated_api",
]
Expand Down
7 changes: 2 additions & 5 deletions ppapi/shared_impl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,6 @@ component("shared_impl") {
"PPAPI_THUNK_IMPLEMENTATION",
]

public_deps = [
"//ppapi/c",
"//ppapi/thunk",
]

deps = [
"//base",
"//base:i18n",
Expand All @@ -174,6 +169,8 @@ component("shared_impl") {
"//gpu/command_buffer/common",
"//ipc",
"//media:shared_memory_support",
"//ppapi/c",
"//ppapi/thunk",
"//third_party/icu:icuuc",
"//url",
]
Expand Down

0 comments on commit 5af9024

Please sign in to comment.