Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import("//build/toolchain/toolchain.gni") | 5 import("//build/toolchain/toolchain.gni") |
| 6 | 6 |
| 7 # Template to package a shared library into a framework bundle. | 7 # Template to package a shared library into a framework bundle. |
| 8 # | 8 # |
| 9 # Arguments | 9 # Arguments |
| 10 # | 10 # |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 | 38 |
| 39 _shared_library_target = target_name + "_shared_library" | 39 _shared_library_target = target_name + "_shared_library" |
| 40 _shared_library_bundle_data = _shared_library_target + "_bundle_data" | 40 _shared_library_bundle_data = _shared_library_target + "_bundle_data" |
| 41 | 41 |
| 42 shared_library(_shared_library_target) { | 42 shared_library(_shared_library_target) { |
| 43 visibility = [ ":$_shared_library_bundle_data" ] | 43 visibility = [ ":$_shared_library_bundle_data" ] |
| 44 forward_variables_from(invoker, | 44 forward_variables_from(invoker, |
| 45 "*", | 45 "*", |
| 46 [ | 46 [ |
| 47 "assert_no_deps", | 47 "assert_no_deps", |
| 48 "configs", | |
| 48 "data_deps", | 49 "data_deps", |
| 49 "output_name", | 50 "output_name", |
| 50 ]) | 51 ]) |
| 52 if (defined(invoker.configs)) { | |
|
Dirk Pranke
2016/04/11 16:38:03
nit: can you add a comment here referencing the bu
Robert Sesek
2016/04/11 18:32:29
Also document this up top as an argument?
sdefresne
2016/04/12 13:05:19
Removed the need for the workaround by using set_d
| |
| 53 configs += invoker.configs | |
| 54 } | |
| 55 if (defined(invoker.removed_configs)) { | |
| 56 configs -= invoker.removed_configs | |
| 57 } | |
| 51 } | 58 } |
| 52 | 59 |
| 53 bundle_data(_shared_library_bundle_data) { | 60 bundle_data(_shared_library_bundle_data) { |
| 54 visibility = [ ":$_framework_target" ] | 61 visibility = [ ":$_framework_target" ] |
| 55 forward_variables_from(invoker, [ "testonly" ]) | 62 forward_variables_from(invoker, [ "testonly" ]) |
| 56 sources = [ | 63 sources = [ |
| 57 "$root_out_dir/${shlib_prefix}${_shared_library_target}${shlib_extension}" , | 64 "$root_out_dir/${shlib_prefix}${_shared_library_target}${shlib_extension}" , |
| 58 ] | 65 ] |
| 59 outputs = [ | 66 outputs = [ |
| 60 "{{bundle_executable_dir}}/$_output_name", | 67 "{{bundle_executable_dir}}/$_output_name", |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 | 162 |
| 156 framework_bundle(target_name) { | 163 framework_bundle(target_name) { |
| 157 forward_variables_from(invoker, "*", [ "info_plist" ]) | 164 forward_variables_from(invoker, "*", [ "info_plist" ]) |
| 158 | 165 |
| 159 if (!defined(deps)) { | 166 if (!defined(deps)) { |
| 160 deps = [] | 167 deps = [] |
| 161 } | 168 } |
| 162 deps += [ ":$_info_plist_bundle_data" ] | 169 deps += [ ":$_info_plist_bundle_data" ] |
| 163 } | 170 } |
| 164 } | 171 } |
| OLD | NEW |