Commit 7479370d authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Move iOS only toolchain-related scripts into build/config/ios.

This CL is a refactor with no intended behavior change.

Bug: 965663
Change-Id: I07a61658d730c0982e52f7e496d05cb274c9ef2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648695Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667184}
parent 1fa42885
......@@ -970,6 +970,57 @@ set_defaults("ios_appex_bundle") {
configs = default_executable_configs
}
# Template to compile .xib and .storyboard files.
#
# Arguments
#
# sources:
# list of string, sources to compile
#
# ibtool_flags:
# (optional) list of string, additional flags to pass to the ibtool
template("compile_ib_files") {
action_foreach(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
assert(defined(invoker.sources),
"sources must be specified for $target_name")
assert(defined(invoker.output_extension),
"output_extension must be specified for $target_name")
ibtool_flags = []
if (defined(invoker.ibtool_flags)) {
ibtool_flags = invoker.ibtool_flags
}
_output_extension = invoker.output_extension
script = "//build/config/ios/compile_ib_files.py"
sources = invoker.sources
outputs = [
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
]
args = [
"--input",
"{{source}}",
"--output",
rebase_path(
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
root_build_dir),
]
if (!use_system_xcode) {
args += [
"--developer_dir",
hermetic_xcode_path,
]
}
args += ibtool_flags
}
}
# Compile a xib or storyboard file and add it to a bundle_data so that it is
# available at runtime in the bundle.
#
......
......@@ -252,54 +252,3 @@ template("info_plist") {
}
}
}
# Template to compile .xib and .storyboard files.
#
# Arguments
#
# sources:
# list of string, sources to compile
#
# ibtool_flags:
# (optional) list of string, additional flags to pass to the ibtool
template("compile_ib_files") {
action_foreach(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
assert(defined(invoker.sources),
"sources must be specified for $target_name")
assert(defined(invoker.output_extension),
"output_extension must be specified for $target_name")
ibtool_flags = []
if (defined(invoker.ibtool_flags)) {
ibtool_flags = invoker.ibtool_flags
}
_output_extension = invoker.output_extension
script = "//build/config/mac/compile_ib_files.py"
sources = invoker.sources
outputs = [
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
]
args = [
"--input",
"{{source}}",
"--output",
rebase_path(
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
root_build_dir),
]
if (!use_system_xcode) {
args += [
"--developer_dir",
hermetic_xcode_path,
]
}
args += ibtool_flags
}
}
......@@ -52,7 +52,7 @@ if (current_toolchain == default_toolchain) {
tool_versions =
exec_script("get_tool_mtime.py",
rebase_path([
"//build/toolchain/mac/compile_xcassets.py",
"//build/config/ios/compile_xcassets.py",
"//build/toolchain/mac/filter_libtool.py",
"//build/toolchain/mac/linker_driver.py",
],
......@@ -460,7 +460,7 @@ template("mac_toolchain") {
# disallow future uses of xcassets on macOS. https://crbug.com/965663.
if (toolchain_args.current_os == "ios") {
tool("compile_xcassets") {
_tool = rebase_path("//build/toolchain/mac/compile_xcassets.py",
_tool = rebase_path("//build/config/ios/compile_xcassets.py",
root_build_dir)
if (is_ios) {
_sdk_name = ios_sdk_name
......
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