[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}
This commit is contained in:
6
BUILD.gn
6
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",
|
||||
|
@ -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" ||
|
||||
|
@ -24,15 +24,15 @@ 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",
|
||||
"armv7",
|
||||
]
|
||||
} else if (current_cpu == "arm64") {
|
||||
common_mac_flags += [
|
||||
"-arch",
|
||||
"arm64",
|
||||
"-arch",
|
||||
"armv7",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
@ -29,6 +29,7 @@ source_set("browser") {
|
||||
"//components/autofill/core/common",
|
||||
"//ios/public/provider/web",
|
||||
"//ios/web",
|
||||
"//ui/gfx/geometry",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
]
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ source_set("browser") {
|
||||
"//components/prefs",
|
||||
"//components/strings",
|
||||
"//components/url_matcher",
|
||||
"//net",
|
||||
"//ui/base",
|
||||
]
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user