summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2016-03-25 17:06:26 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-26 00:07:47 +0000
commit3bdd5635f4dba38c3035fe992039a833988e147b (patch)
tree83ec0f14deaddad3ff8bb3062300222f993ea894
parent2edf9869450cdd9337eab5bc92623a0f074cc7ed (diff)
downloadchromium_src-3bdd5635f4dba38c3035fe992039a833988e147b.zip
chromium_src-3bdd5635f4dba38c3035fe992039a833988e147b.tar.gz
chromium_src-3bdd5635f4dba38c3035fe992039a833988e147b.tar.bz2
[iOS/GN] Fix compilation of ios_chrome_unittests with gn.
Get GN in sync with gyp by adding missing dependencies, removing the obsoletes dependencies and adding missing files and targets. Change the toolchain when targetting iOS devices to not build fat binaries as this break the "gn gen"-time selection of the level of optimisation to use from skia and libwebp. Instead, building for devices on iOS is now similar to other platforms (i.e. the arch is selected via "target_cpu" with "arm" an alias for "armv7"). Fixes the following errors: Undefined symbols for architecture arm64: "_VP8DspInitNEON", referenced from: _VP8DspInit in dec.o ... BUG=459705,596237 Review URL: https://codereview.chromium.org/1810423002 Cr-Commit-Position: refs/heads/master@{#383416}
-rw-r--r--BUILD.gn6
-rw-r--r--build/config/arm.gni5
-rw-r--r--build/config/mac/BUILD.gn12
-rw-r--r--build/toolchain/mac/BUILD.gn29
-rw-r--r--components/autofill/ios/browser/BUILD.gn1
-rw-r--r--components/dom_distiller/ios/BUILD.gn3
-rw-r--r--components/policy/core/browser/BUILD.gn1
-rw-r--r--ios/chrome/browser/BUILD.gn57
-rw-r--r--ios/chrome/test/BUILD.gn1
-rw-r--r--ios/net/BUILD.gn2
-rw-r--r--ios/public/provider/chrome/browser/BUILD.gn2
11 files changed, 91 insertions, 28 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 35133fd..73d151a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -197,9 +197,9 @@ group("both_gn_and_gyp") {
]
} else {
deps += [
- #"//ios/chrome:ios_chrome_unittests", TODO(GYP)
- #"//ios/chrome/app", TODO(GYP)
- #"//ios/chrome/browser", TODO(GYP)
+ "//ios/chrome:ios_chrome_unittests",
+ "//ios/chrome/app",
+ "//ios/chrome/browser",
"//ios/chrome/common",
"//ios/net:ios_net_unittests",
"//ios/public/provider/chrome/browser",
diff --git a/build/config/arm.gni b/build/config/arm.gni
index d9d2eae..4fd4006 100644
--- a/build/config/arm.gni
+++ b/build/config/arm.gni
@@ -23,11 +23,6 @@ if (current_cpu == "arm") {
# Whether to enable optional NEON code paths.
arm_optionally_use_neon = false
-
- if (is_ios) {
- arm_use_neon = false
- arm_optionally_use_neon = false
- }
}
assert(arm_float_abi == "" || arm_float_abi == "hard" ||
diff --git a/build/config/mac/BUILD.gn b/build/config/mac/BUILD.gn
index af1fbbc..56e101c 100644
--- a/build/config/mac/BUILD.gn
+++ b/build/config/mac/BUILD.gn
@@ -24,16 +24,16 @@ config("compiler") {
"-arch",
"i386",
]
- } else if (current_cpu == "arm") {
- # TODO(GYP): we may need to distinguish between "arm64", "armv7",
- # and "armv7s" for iOS, and hence need multiple current_cpu values
- # rather than just "arm".
+ } else if (current_cpu == "armv7" || current_cpu == "arm") {
common_mac_flags += [
"-arch",
- "arm64",
- "-arch",
"armv7",
]
+ } else if (current_cpu == "arm64") {
+ common_mac_flags += [
+ "-arch",
+ "arm64",
+ ]
}
asmflags = common_mac_flags
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 423de77..d198299 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -289,7 +289,6 @@ mac_toolchain("clang_arm") {
}
mac_toolchain("ios_clang_arm") {
- # TODO(GYP): Do we need ios_clang_armv7 and ios_clang_arm64 ?
toolchain_cpu = "arm"
toolchain_os = "mac"
@@ -303,6 +302,34 @@ mac_toolchain("ios_clang_arm") {
is_clang = true
}
+mac_toolchain("ios_clang_armv7") {
+ toolchain_cpu = "armv7"
+ toolchain_os = "mac"
+
+ # TODO(GYP): We need to support being able to use the version of clang
+ # shipped w/ XCode instead of the one pulled from upstream.
+ prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
+ root_build_dir)
+ cc = "${goma_prefix}$prefix/clang"
+ cxx = "${goma_prefix}$prefix/clang++"
+ ld = cxx
+ is_clang = true
+}
+
+mac_toolchain("ios_clang_arm64") {
+ toolchain_cpu = "arm64"
+ toolchain_os = "mac"
+
+ # TODO(GYP): We need to support being able to use the version of clang
+ # shipped w/ XCode instead of the one pulled from upstream.
+ prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
+ root_build_dir)
+ cc = "${goma_prefix}$prefix/clang"
+ cxx = "${goma_prefix}$prefix/clang++"
+ ld = cxx
+ is_clang = true
+}
+
mac_toolchain("arm") {
toolchain_cpu = "arm"
toolchain_os = "mac"
diff --git a/components/autofill/ios/browser/BUILD.gn b/components/autofill/ios/browser/BUILD.gn
index 65ae876..91dbed3 100644
--- a/components/autofill/ios/browser/BUILD.gn
+++ b/components/autofill/ios/browser/BUILD.gn
@@ -29,6 +29,7 @@ source_set("browser") {
"//components/autofill/core/common",
"//ios/public/provider/web",
"//ios/web",
+ "//ui/gfx/geometry",
]
}
diff --git a/components/dom_distiller/ios/BUILD.gn b/components/dom_distiller/ios/BUILD.gn
index 35a4a18..fe60646 100644
--- a/components/dom_distiller/ios/BUILD.gn
+++ b/components/dom_distiller/ios/BUILD.gn
@@ -11,8 +11,11 @@ source_set("ios") {
]
deps = [
+ "//base",
"//components/dom_distiller/core",
"//components/dom_distiller/core/proto",
"//ios/public/provider/web",
+ "//ios/web",
+ "//url",
]
}
diff --git a/components/policy/core/browser/BUILD.gn b/components/policy/core/browser/BUILD.gn
index ff65ce4..6ca6451 100644
--- a/components/policy/core/browser/BUILD.gn
+++ b/components/policy/core/browser/BUILD.gn
@@ -27,6 +27,7 @@ source_set("browser") {
"//components/prefs",
"//components/strings",
"//components/url_matcher",
+ "//net",
"//ui/base",
]
diff --git a/ios/chrome/browser/BUILD.gn b/ios/chrome/browser/BUILD.gn
index ddf8911..96b0664 100644
--- a/ios/chrome/browser/BUILD.gn
+++ b/ios/chrome/browser/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/features.gni")
import("//ios/web/js_compile.gni")
+import("//third_party/protobuf/proto_library.gni")
declare_args() {
google_test_gaia_client_id = ""
@@ -18,6 +19,12 @@ declare_args() {
google_test_sync_url = ""
}
+proto_library("metadata_proto") {
+ sources = [
+ "safe_browsing/metadata.proto",
+ ]
+}
+
source_set("browser") {
sources = [
"app_startup_parameters.h",
@@ -57,8 +64,12 @@ source_set("browser") {
"bookmarks/bookmark_client_impl.h",
"bookmarks/bookmark_model_factory.cc",
"bookmarks/bookmark_model_factory.h",
+ "bookmarks/bookmarks_utils.cc",
+ "bookmarks/bookmarks_utils.h",
"bookmarks/startup_task_runner_service_factory.cc",
"bookmarks/startup_task_runner_service_factory.h",
+ "browser_state/bookmark_model_loaded_observer.cc",
+ "browser_state/bookmark_model_loaded_observer.h",
"browser_state/browser_state_info_cache.cc",
"browser_state/browser_state_info_cache.h",
"browser_state/browser_state_info_cache_observer.h",
@@ -202,8 +213,8 @@ source_set("browser") {
"install_time_util.mm",
"installation_notifier.h",
"installation_notifier.mm",
- "interstitials/ios_chrome_controller_client.cc",
"interstitials/ios_chrome_controller_client.h",
+ "interstitials/ios_chrome_controller_client.mm",
"interstitials/ios_chrome_metrics_helper.h",
"interstitials/ios_chrome_metrics_helper.mm",
"interstitials/ios_security_interstitial_page.h",
@@ -212,6 +223,8 @@ source_set("browser") {
"invalidation/ios_chrome_profile_invalidation_provider_factory.mm",
"ios_chrome_field_trials.cc",
"ios_chrome_field_trials.h",
+ "ios_chrome_io_thread.h",
+ "ios_chrome_io_thread.mm",
"ios_chrome_main_parts.h",
"ios_chrome_main_parts.mm",
"memory/memory_debugger.h",
@@ -240,6 +253,8 @@ source_set("browser") {
"net/connection_type_observer_bridge.mm",
"net/cookie_util.h",
"net/cookie_util.mm",
+ "net/crl_set_fetcher.cc",
+ "net/crl_set_fetcher.h",
"net/http_server_properties_manager_factory.cc",
"net/http_server_properties_manager_factory.h",
"net/image_fetcher.h",
@@ -271,10 +286,16 @@ source_set("browser") {
"passwords/ios_chrome_password_store_factory.h",
"passwords/ios_chrome_save_password_infobar_delegate.h",
"passwords/ios_chrome_save_password_infobar_delegate.mm",
+ "passwords/js_password_manager.h",
+ "passwords/js_password_manager.mm",
"passwords/password_controller.h",
"passwords/password_controller.mm",
"passwords/password_generation_agent.h",
"passwords/password_generation_agent.mm",
+ "passwords/password_generation_edit_view.h",
+ "passwords/password_generation_edit_view.mm",
+ "passwords/password_generation_offer_view.h",
+ "passwords/password_generation_offer_view.mm",
"passwords/password_generation_prompt_delegate.h",
"passwords/password_generation_utils.h",
"passwords/password_generation_utils.mm",
@@ -299,6 +320,23 @@ source_set("browser") {
"reading_list/reading_list_model_memory.cc",
"reading_list/reading_list_model_memory.h",
"reading_list/reading_list_model_observer.h",
+ "reading_list/reading_list_model_storage.h",
+ "reading_list/reading_list_model_storage_defaults.h",
+ "reading_list/reading_list_model_storage_defaults.mm",
+ "safe_browsing/hit_report.cc",
+ "safe_browsing/hit_report.h",
+ "safe_browsing/ping_manager.cc",
+ "safe_browsing/ping_manager.h",
+ "safe_browsing/protocol_manager_helper.cc",
+ "safe_browsing/protocol_manager_helper.h",
+ "safe_browsing/safe_browsing_blocking_page.h",
+ "safe_browsing/safe_browsing_blocking_page.mm",
+ "safe_browsing/safe_browsing_service.cc",
+ "safe_browsing/safe_browsing_service.h",
+ "safe_browsing/ui_manager.h",
+ "safe_browsing/ui_manager.mm",
+ "safe_browsing/util.cc",
+ "safe_browsing/util.h",
"search/search_util.h",
"search/search_util.mm",
"search_engines/search_engines_util.cc",
@@ -515,6 +553,7 @@ source_set("browser") {
deps = [
":about_flags",
":injected_js",
+ ":metadata_proto",
"//base",
"//breakpad:client",
"//components/about_handler",
@@ -548,6 +587,7 @@ source_set("browser") {
"//components/metrics",
"//components/metrics:net",
"//components/metrics:profiler",
+ "//components/metrics:profiler_ios",
"//components/metrics:ui",
"//components/metrics_services_manager",
"//components/net_log",
@@ -564,7 +604,6 @@ source_set("browser") {
"//components/proxy_config",
"//components/rappor",
"//components/resources",
- "//components/safe_browsing_db",
"//components/search",
"//components/search_engines",
"//components/security_interstitials/core",
@@ -573,6 +612,7 @@ source_set("browser") {
"//components/signin/core/browser",
"//components/signin/core/common",
"//components/signin/ios/browser",
+ "//components/ssl_config",
"//components/strings",
"//components/suggestions",
"//components/sync_driver",
@@ -628,13 +668,6 @@ source_set("browser") {
"//components/rlz",
]
}
-
- if (enable_configuration_policy) {
- deps += [
- "//components/policy/core/browser",
- "//components/policy/core/common",
- ]
- }
}
# This is a separate target so that the 'defines' does not leak to the
@@ -704,13 +737,12 @@ source_set("test_support") {
"browser_state/test_chrome_browser_state.mm",
"browser_state/test_chrome_browser_state_isolated_context.h",
"browser_state/test_chrome_browser_state_isolated_context.mm",
- "browser_state/test_chrome_browser_state_manager.c",
- "browser_state/test_chrome_browser_state_manager.h",
"geolocation/location_manager+Testing.h",
"geolocation/test_location_manager.h",
"geolocation/test_location_manager.mm",
"net/mock_image_fetcher.h",
"net/mock_image_fetcher.mm",
+ "safe_browsing/util_unittest.cc",
"signin/fake_oauth2_token_service_builder.h",
"signin/fake_oauth2_token_service_builder.mm",
"signin/fake_signin_manager_builder.cc",
@@ -726,9 +758,10 @@ source_set("test_support") {
deps = [
":browser",
"//base",
- "//components/browser_sync/browser",
+ "//components/browser_sync/browser:test_support",
"//components/keyed_service/core",
"//components/keyed_service/ios",
+ "//components/pref_registry:test_support",
"//components/signin/core/browser",
"//components/signin/ios/browser",
"//components/sync_driver",
diff --git a/ios/chrome/test/BUILD.gn b/ios/chrome/test/BUILD.gn
index 0d635db..f7e97a0 100644
--- a/ios/chrome/test/BUILD.gn
+++ b/ios/chrome/test/BUILD.gn
@@ -23,7 +23,6 @@ source_set("test") {
"//components/network_time",
"//components/prefs",
"//ios/chrome/browser",
- "//ios/chrome/browser:test_support",
"//ios/public/provider/chrome/browser",
"//ios/web",
"//testing/gmock",
diff --git a/ios/net/BUILD.gn b/ios/net/BUILD.gn
index d894d7b..ba7b2c1 100644
--- a/ios/net/BUILD.gn
+++ b/ios/net/BUILD.gn
@@ -37,6 +37,8 @@ source_set("net") {
"crn_http_url_response.mm",
"empty_nsurlcache.h",
"empty_nsurlcache.mm",
+ "http_cache_helper.cc",
+ "http_cache_helper.h",
"http_protocol_logging.h",
"http_protocol_logging.mm",
"http_response_headers_util.h",
diff --git a/ios/public/provider/chrome/browser/BUILD.gn b/ios/public/provider/chrome/browser/BUILD.gn
index e23994a..b8c2da6 100644
--- a/ios/public/provider/chrome/browser/BUILD.gn
+++ b/ios/public/provider/chrome/browser/BUILD.gn
@@ -4,6 +4,8 @@
source_set("browser") {
sources = [
+ "browser_constants.cc",
+ "browser_constants.h",
"chrome_browser_provider.h",
"chrome_browser_provider.mm",
"geolocation_updater_provider.h",