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

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

Issue 2119843004: WIP // DO NOT SUBMIT Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | build/config/mac/rules.gni » ('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 8
9 if (is_mac) { 9 if (is_mac) {
10 import("//build/config/mac/mac_sdk.gni") 10 import("//build/config/mac/mac_sdk.gni")
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 # output_name: 138 # output_name:
139 # (optional) string, name of the generated framework without the 139 # (optional) string, name of the generated framework without the
140 # .framework suffix. If omitted, defaults to target_name. 140 # .framework suffix. If omitted, defaults to target_name.
141 # 141 #
142 # framework_version: 142 # framework_version:
143 # (optional) string, version of the framework. Typically this is a 143 # (optional) string, version of the framework. Typically this is a
144 # single letter, like "A". If omitted, the Versions/ subdirectory 144 # single letter, like "A". If omitted, the Versions/ subdirectory
145 # structure will not be created, and build output will go directly 145 # structure will not be created, and build output will go directly
146 # into the framework subdirectory. 146 # into the framework subdirectory.
147 # 147 #
148 # linker_inputs:
149 # (optional) list of string, additional inputs to list to the link step
150 # that are not source files. Examples would be strip, save, or order
151 # files.
152 #
148 # This template provides two targets for the resulting framework bundle. The 153 # This template provides two targets for the resulting framework bundle. The
149 # link-time behavior varies depending on which of the two targets below is 154 # link-time behavior varies depending on which of the two targets below is
150 # added as a dependency: 155 # added as a dependency:
151 # - $target_name only adds a build-time dependency. Targets that depend on 156 # - $target_name only adds a build-time dependency. Targets that depend on
152 # it will not link against the framework. 157 # it will not link against the framework.
153 # - $target_name+link adds a build-time and link-time dependency. Targets 158 # - $target_name+link adds a build-time and link-time dependency. Targets
154 # that depend on it will link against the framework. 159 # that depend on it will link against the framework.
155 # 160 #
156 # The build-time-only dependency is used for when a target needs to use the 161 # The build-time-only dependency is used for when a target needs to use the
157 # framework either only for resources, or because the target loads it at run- 162 # framework either only for resources, or because the target loads it at run-
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 _framework_root_dir = "$root_out_dir/$_framework_name" 232 _framework_root_dir = "$root_out_dir/$_framework_name"
228 if (defined(invoker.framework_version) && invoker.framework_version != "") { 233 if (defined(invoker.framework_version) && invoker.framework_version != "") {
229 _framework_version = invoker.framework_version 234 _framework_version = invoker.framework_version
230 _framework_root_dir += "/Versions/$_framework_version" 235 _framework_root_dir += "/Versions/$_framework_version"
231 _framework_target = _target_name + "_create_bundle" 236 _framework_target = _target_name + "_create_bundle"
232 } 237 }
233 238
234 _shared_library_target = target_name + "_shared_library" 239 _shared_library_target = target_name + "_shared_library"
235 _shared_library_bundle_data = _shared_library_target + "_bundle_data" 240 _shared_library_bundle_data = _shared_library_target + "_bundle_data"
236 241
242 # Hack for https://crbug.com/395883.
243 if (defined(invoker.linker_inputs)) { assert(invoker.linker_inputs != []) }
244
237 shared_library(_shared_library_target) { 245 shared_library(_shared_library_target) {
238 visibility = [ ":$_shared_library_bundle_data" ] 246 visibility = [ ":$_shared_library_bundle_data" ]
239 forward_variables_from(invoker, 247 forward_variables_from(invoker,
240 "*", 248 "*",
241 [ 249 [
242 "assert_no_deps", 250 "assert_no_deps",
243 "data_deps", 251 "data_deps",
244 "info_plist", 252 "info_plist",
245 "output_name", 253 "output_name",
246 "visibility", 254 "visibility",
247 ]) 255 ])
248 output_name = _output_name 256 output_name = _output_name
249 output_prefix_override = true 257 output_prefix_override = true
250 output_extension = "" 258 output_extension = ""
251 output_dir = "$target_out_dir/$_shared_library_target" 259 output_dir = "$target_out_dir/$_shared_library_target"
260 if (defined(invoker.linker_inputs)) {
261 inputs = invoker.linker_inputs
262 }
252 } 263 }
253 264
254 bundle_data(_shared_library_bundle_data) { 265 bundle_data(_shared_library_bundle_data) {
255 visibility = [ ":$_framework_target" ] 266 visibility = [ ":$_framework_target" ]
256 forward_variables_from(invoker, [ "testonly" ]) 267 forward_variables_from(invoker, [ "testonly" ])
257 sources = [ 268 sources = [
258 "$target_out_dir/$_shared_library_target/$_output_name", 269 "$target_out_dir/$_shared_library_target/$_output_name",
259 ] 270 ]
260 outputs = [ 271 outputs = [
261 "{{bundle_executable_dir}}/$_output_name", 272 "{{bundle_executable_dir}}/$_output_name",
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 "$target_gen_dir/{{source_name_part}}.nib", 380 "$target_gen_dir/{{source_name_part}}.nib",
370 ] 381 ]
371 args = [ 382 args = [
372 "--input", 383 "--input",
373 "{{source}}", 384 "{{source}}",
374 "--output", 385 "--output",
375 rebase_path("$target_gen_dir/{{source_name_part}}.nib"), 386 rebase_path("$target_gen_dir/{{source_name_part}}.nib"),
376 ] + ibtool_flags 387 ] + ibtool_flags
377 } 388 }
378 } 389 }
OLDNEW
« no previous file with comments | « no previous file | build/config/mac/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698