Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: build/config/mac/base_rules.gni

Issue 2169973002: Add bundle_deps to ios_{app,framework}_bundle templates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-app-bundle-executable
Patch Set: Fix compilation of fat builds. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/ios/rules.gni ('k') | components/cronet/ios/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file contains rules that are shared between Mac and iOS. 5 # This file contains rules that are shared between Mac and iOS.
6 6
7 import("//build/toolchain/toolchain.gni") 7 import("//build/toolchain/toolchain.gni")
8 import("//build/config/mac/symbols.gni") 8 import("//build/config/mac/symbols.gni")
9 9
10 if (is_mac) { 10 if (is_mac) {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 # target of the same name from the default toolchain as this is the target 237 # target of the same name from the default toolchain as this is the target
238 # that defines the real framework bundle (it will support the current cpu 238 # that defines the real framework bundle (it will support the current cpu
239 # as it is a fat framework). 239 # as it is a fat framework).
240 240
241 if (_is_fat_build && !_is_fat_build_main_target) { 241 if (_is_fat_build && !_is_fat_build_main_target) {
242 shared_library(_target_name) { 242 shared_library(_target_name) {
243 forward_variables_from(invoker, 243 forward_variables_from(invoker,
244 "*", 244 "*",
245 [ 245 [
246 "assert_no_deps", 246 "assert_no_deps",
247 "bundle_deps",
247 "data_deps", 248 "data_deps",
248 "info_plist", 249 "info_plist",
249 "output_name", 250 "output_name",
250 ]) 251 ])
251 if (defined(visibility)) { 252 if (defined(visibility)) {
252 visibility += [ ":${_target_name}_shared_library($default_toolchain)" ] 253 visibility += [ ":${_target_name}_shared_library($default_toolchain)" ]
253 } 254 }
254 output_name = _output_name 255 output_name = _output_name
255 output_prefix_override = true 256 output_prefix_override = true
256 output_extension = "" 257 output_extension = ""
257 output_dir = "$target_out_dir/$_target_name" 258 output_dir = "$target_out_dir/$_target_name"
258 } 259 }
259 260
260 group(_target_name + "+link") { 261 group(_target_name + "+link") {
261 forward_variables_from(invoker, 262 forward_variables_from(invoker,
262 [ 263 [
263 "visibility", 264 "visibility",
264 "testonly", 265 "testonly",
265 ]) 266 ])
266 public_deps = [ 267 public_deps = [
267 ":$_target_name($default_toolchain)", 268 ":$_target_name($default_toolchain)",
268 ] 269 ]
269 } 270 }
271
272 if (defined(invoker.bundle_deps)) {
273 assert(invoker.bundle_deps != [], "mark bundle_deps as used")
274 }
270 } else { 275 } else {
271 # If the framework is unversioned, the final _target_name will be the 276 # If the framework is unversioned, the final _target_name will be the
272 # create_bundle(_framework_target), otherwise an action with the name 277 # create_bundle(_framework_target), otherwise an action with the name
273 # _target_name will depends on the the create_bundle() in order to prepare 278 # _target_name will depends on the the create_bundle() in order to prepare
274 # the versioned directory structure. 279 # the versioned directory structure.
275 _framework_target = _target_name 280 _framework_target = _target_name
276 _framework_name = _output_name + ".framework" 281 _framework_name = _output_name + ".framework"
277 _framework_root_dir = "$root_out_dir/$_framework_name" 282 _framework_root_dir = "$root_out_dir/$_framework_name"
278 if (defined(invoker.framework_version) && invoker.framework_version != "") { 283 if (defined(invoker.framework_version) && invoker.framework_version != "") {
279 _framework_version = invoker.framework_version 284 _framework_version = invoker.framework_version
(...skipping 12 matching lines...) Expand all
292 _link_shared_library_visibility = [] 297 _link_shared_library_visibility = []
293 _link_shared_library_visibility = [ ":$_lipo_shared_library_target" ] 298 _link_shared_library_visibility = [ ":$_lipo_shared_library_target" ]
294 _link_shared_library_target = target_name + "_arch_shared_library" 299 _link_shared_library_target = target_name + "_arch_shared_library"
295 } 300 }
296 301
297 shared_library(_link_shared_library_target) { 302 shared_library(_link_shared_library_target) {
298 forward_variables_from(invoker, 303 forward_variables_from(invoker,
299 "*", 304 "*",
300 [ 305 [
301 "assert_no_deps", 306 "assert_no_deps",
307 "bundle_deps",
302 "data_deps", 308 "data_deps",
303 "info_plist", 309 "info_plist",
304 "output_name", 310 "output_name",
305 "visibility", 311 "visibility",
306 ]) 312 ])
307 visibility = _link_shared_library_visibility 313 visibility = _link_shared_library_visibility
308 output_name = _output_name 314 output_name = _output_name
309 output_prefix_override = true 315 output_prefix_override = true
310 output_extension = "" 316 output_extension = ""
311 output_dir = "$target_out_dir/$_link_shared_library_target" 317 output_dir = "$target_out_dir/$_link_shared_library_target"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 visibility = invoker.visibility 427 visibility = invoker.visibility
422 visibility += [ ":$_target_name+link" ] 428 visibility += [ ":$_target_name+link" ]
423 } 429 }
424 } 430 }
425 431
426 if (!defined(public_deps)) { 432 if (!defined(public_deps)) {
427 public_deps = [] 433 public_deps = []
428 } 434 }
429 public_deps += [ ":$_shared_library_bundle_data" ] 435 public_deps += [ ":$_shared_library_bundle_data" ]
430 436
437 if (defined(invoker.bundle_deps)) {
438 public_deps += invoker.bundle_deps
439 }
440
431 bundle_root_dir = _framework_root_dir 441 bundle_root_dir = _framework_root_dir
432 bundle_resources_dir = "$bundle_root_dir/Resources" 442 bundle_resources_dir = "$bundle_root_dir/Resources"
433 bundle_executable_dir = "$bundle_root_dir" 443 bundle_executable_dir = "$bundle_root_dir"
434 } 444 }
435 445
436 if (defined(_framework_version)) { 446 if (defined(_framework_version)) {
437 action(_target_name) { 447 action(_target_name) {
438 forward_variables_from(invoker, [ "testonly" ]) 448 forward_variables_from(invoker, [ "testonly" ])
439 449
440 if (defined(invoker.visibility)) { 450 if (defined(invoker.visibility)) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 ] 511 ]
502 args = 512 args =
503 [ 513 [
504 "--input", 514 "--input",
505 "{{source}}", 515 "{{source}}",
506 "--output", 516 "--output",
507 rebase_path("$target_gen_dir/$target_name/{{source_name_part}}.nib"), 517 rebase_path("$target_gen_dir/$target_name/{{source_name_part}}.nib"),
508 ] + ibtool_flags 518 ] + ibtool_flags
509 } 519 }
510 } 520 }
OLDNEW
« no previous file with comments | « build/config/ios/rules.gni ('k') | components/cronet/ios/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698