Skip to content

Commit

Permalink
Exclude some GN targets from the Android build.
Browse files Browse the repository at this point in the history
Also sync up GN with GYP as needed.

BUG=159847

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

Cr-Commit-Position: refs/heads/master@{#386758}
  • Loading branch information
leizleiz authored and Commit bot committed Apr 12, 2016
1 parent c9295d4 commit f2cc083
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 45 deletions.
2 changes: 2 additions & 0 deletions apps/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import("//build/config/features.gni")
import("//build/config/ui.gni")

assert(!is_android && !is_ios)

static_library("apps") {
sources = [
"app_lifetime_monitor.cc",
Expand Down
23 changes: 7 additions & 16 deletions chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ source_set("browser") {
}

deps += [
"//apps",
"//cc",
"//chrome/app/theme:theme_resources",
"//chrome/browser/devtools",
Expand Down Expand Up @@ -363,7 +362,6 @@ source_set("browser") {
"//components/visitedlink/browser",
"//components/visitedlink/common",
"//components/web_cache/browser",
"//components/web_modal",
"//components/webusb",
"//content/app/resources",
"//device/core",
Expand Down Expand Up @@ -432,16 +430,6 @@ source_set("browser") {
"net/disk_cache_dir_policy_handler.h",
]
}
if (!is_android && !is_ios) {
sources += [
"download/download_dir_policy_handler.cc",
"download/download_dir_policy_handler.h",
]
deps += [
"//chrome/browser/policy:path_parser",
"//net:net_browser_services",
]
}
if (is_mac) {
sources +=
rebase_path(gypi_values.chrome_browser_mac_sources, ".", "//chrome")
Expand Down Expand Up @@ -736,13 +724,17 @@ source_set("browser") {
rebase_path(gypi_values.chrome_browser_mobile_sources, ".", "//chrome")
} else {
# Non-mobile.
sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
".",
"//chrome")
deps += [
"//apps",
"//chrome/browser/policy:path_parser",
"//chrome/browser/profile_resetter:profile_reset_report_proto",
"//components/feedback",
"//components/web_modal",
"//net:net_browser_services",
]
sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
".",
"//chrome")
}

if (!is_chrome_branded) {
Expand Down Expand Up @@ -789,7 +781,6 @@ source_set("browser") {

deps -= [
"//components/storage_monitor",
"//components/web_modal",
"//third_party/libaddressinput",
]

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ source_set("ui") {
"//components/upload_list",
"//components/user_prefs",
"//components/version_ui",
"//components/web_modal",
"//components/web_resource",
"//content/public/common",
"//crypto",
Expand Down
19 changes: 7 additions & 12 deletions chrome/chrome_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,8 @@
'browser/download/download_crx_util.h',
'browser/download/download_danger_prompt.cc',
'browser/download/download_danger_prompt.h',
'browser/download/download_dir_policy_handler.cc',
'browser/download/download_dir_policy_handler.h',
'browser/download/download_permission_request.cc',
'browser/download/download_permission_request.h',
'browser/download/download_shelf.cc',
Expand Down Expand Up @@ -3278,12 +3280,10 @@
'conditions': [
['OS != "ios"', {
'dependencies': [
'apps',
'common_mojo_bindings',
'common_net',
'debugger',
'installer_util',
'../third_party/re2/re2.gyp:re2',
'../cc/cc.gyp:cc',
'../components/components.gyp:about_handler',
'../components/components.gyp:autofill_content_browser',
Expand Down Expand Up @@ -3332,7 +3332,6 @@
'../components/components.gyp:visitedlink_common',
'../components/components.gyp:wallpaper',
'../components/components.gyp:web_cache_browser',
'../components/components.gyp:web_modal',
'../components/components.gyp:web_resource',
'../components/components.gyp:webusb',
'../components/components_resources.gyp:components_resources',
Expand All @@ -3357,6 +3356,7 @@
'../net/net.gyp:net_with_v8',
'../storage/storage_browser.gyp:storage',
'../storage/storage_common.gyp:storage_common',
'../third_party/re2/re2.gyp:re2',
'../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
'../third_party/libaddressinput/libaddressinput.gyp:libaddressinput',
'../third_party/libyuv/libyuv.gyp:libyuv',
Expand Down Expand Up @@ -3447,12 +3447,6 @@
'browser/net/disk_cache_dir_policy_handler.h',
],
}],
['OS!="android" and OS!="ios"', {
'sources': [
'browser/download/download_dir_policy_handler.cc',
'browser/download/download_dir_policy_handler.h',
],
}],
['OS=="mac"', {
'dependencies': [
'app_shim',
Expand Down Expand Up @@ -3732,10 +3726,12 @@
}, { # OS!="android" and OS!="ios" (non-Mobile).
'sources': [ '<@(chrome_browser_non_mobile_sources)' ],
'dependencies': [
'../components/components.gyp:feedback_component',
'../net/net.gyp:net_browser_services',
'apps',
'policy_path_parser',
'profile_reset_report_proto',
'../components/components.gyp:feedback_component',
'../components/components.gyp:web_modal',
'../net/net.gyp:net_browser_services',
]
}],
['OS=="android"', {
Expand All @@ -3748,7 +3744,6 @@
],
'dependencies!': [
'../components/components.gyp:storage_monitor',
'../components/components.gyp:web_modal',
'../third_party/libaddressinput/libaddressinput.gyp:libaddressinput',
],
'sources': [
Expand Down
32 changes: 16 additions & 16 deletions components/web_modal/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(!is_android && !is_ios)

static_library("web_modal") {
sources = [
"modal_dialog_host.cc",
Expand Down Expand Up @@ -44,20 +46,18 @@ static_library("test_support") {
]
}

if (!is_android && !is_ios) {
source_set("unit_tests") {
testonly = true

sources = [
"web_contents_modal_dialog_manager_unittest.cc",
]

deps = [
":test_support",
":web_modal",
"//base",
"//content/test:test_support",
"//testing/gtest",
]
}
source_set("unit_tests") {
testonly = true

sources = [
"web_contents_modal_dialog_manager_unittest.cc",
]

deps = [
":test_support",
":web_modal",
"//base",
"//content/test:test_support",
"//testing/gtest",
]
}

0 comments on commit f2cc083

Please sign in to comment.