Commit 50d4606c authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Fix compilation of official build with Firebase enabled

Official build with Firebase enabled uses variants to specify
which Info.plist to use as resource for Firebase. This causes
a conflict as two bundle_data have the same output path.

Move the dependency on ios_firebase_resources_target to the
definition of the "chrome" target, behind the check for use
of the variants to prevent this conflit.

Bug: none
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: If6c681f76b7315002dc1cc97c402e6f10f42efcb
Reviewed-on: https://chromium-review.googlesource.com/1250924
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595400}
parent f3bc06bd
...@@ -286,7 +286,16 @@ ios_app_bundle("chrome") { ...@@ -286,7 +286,16 @@ ios_app_bundle("chrome") {
bundle_deps = [ "//ios/chrome/app/resources" ] bundle_deps = [ "//ios/chrome/app/resources" ]
if (!is_chrome_branded || ios_chrome_app_variants == []) { if (!is_chrome_branded || ios_chrome_app_variants == []) {
assert(ios_application_icons_target != "",
"ios_application_icons_target must be defined.")
bundle_deps += [ ios_application_icons_target ] bundle_deps += [ ios_application_icons_target ]
if (ios_enable_firebase_sdk) {
assert(ios_firebase_resources_target != "",
"ios_firebase_resources_target must be defined if Firebase SDK " +
"is enabled.")
bundle_deps += [ ios_firebase_resources_target ]
}
} else { } else {
variants = ios_chrome_app_variants variants = ios_chrome_app_variants
} }
......
...@@ -2,13 +2,7 @@ ...@@ -2,13 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//ios/third_party/firebase/firebase.gni")
source_set("firebase") { source_set("firebase") {
assert(
ios_firebase_resources_target != "",
"ios_firebase_resources_target must be defined if Firebase SDK is enabled.")
# From gn documentation: # From gn documentation:
# https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/reference.md#ldflags # https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/reference.md#ldflags
# "ldflags are NOT pushed to dependents, so applying ldflags to source sets # "ldflags are NOT pushed to dependents, so applying ldflags to source sets
...@@ -19,9 +13,6 @@ source_set("firebase") { ...@@ -19,9 +13,6 @@ source_set("firebase") {
# This source_set must be specified as a direct deps of an ios_app_bundle # This source_set must be specified as a direct deps of an ios_app_bundle
# target for ldflags specified in :firebase_config to be applied. # target for ldflags specified in :firebase_config to be applied.
public_configs = [ ":firebase_config" ] public_configs = [ ":firebase_config" ]
deps = [
ios_firebase_resources_target,
]
} }
config("firebase_config") { config("firebase_config") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment