Commit 8420c60c authored by Peter K. Lee's avatar Peter K. Lee 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 conflict.

Patchset 1 is the original CL http://crrev/c/1250924 by sdefresne
from which this CL is cloned from.

TBR=sdefresne@chromium.org, justincohen@chromium.org

Bug: 845383
Change-Id: I0e74f04f27708eb970c61b1048cb2492c45cbba4
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/1252321
Commit-Queue: Peter Lee <pkl@chromium.org>
Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595187}
parent a2285f51
...@@ -286,7 +286,20 @@ ios_app_bundle("chrome") { ...@@ -286,7 +286,20 @@ 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.")
# Empty list assigned to bundle_deps to indicate that this is an
# intentional override of bundle_deps.
bundle_deps = []
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