blob: f321dda68aba25fa970b928e4151d680c482d810 [file] [log] [blame]
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/common/config.gni")
# Copies an input macOS binary to the specified output path. Bitcode segments,
# if any, are stripped.
#
# Example:
#
# strip_bitcode(
# input = "$root_build_dir/gen_snapshot"
# output = "$root_build_dir/gen_snapshot_arm64"
# deps = [ ":gen_snapshot" ]
# )
#
# TODO(cbracken): https://github.com/flutter/flutter/issues/107884
# When we stop building with bitcode enabled, this template and the
# strip_bitcode.py script can be deleted and users can call copy() instead.
template("strip_bitcode") {
assert(defined(invoker.input), "The input to strip_bitcode must be defined")
assert(defined(invoker.output), "The output to strip_bitcode most be defined")
action(target_name) {
forward_variables_from(invoker,
[
"deps",
"metadata",
"visibility",
])
script = "//flutter/sky/tools/strip_bitcode.py"
args = [
"--input",
rebase_path(invoker.input),
"--output",
rebase_path(invoker.output),
]
inputs = [ invoker.input ]
outputs = [ invoker.output ]
}
}