| # Copyright 2022 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("//starboard/evergreen/arm/shared/toolchain/strip.gni") |
| import("//starboard/evergreen/shared/lz4_compress_install_target.gni") |
| import("//starboard/evergreen/shared/strip_install_target.gni") |
| |
| template("install_target") { |
| strip_install_target(target_name) { |
| forward_variables_from(invoker, "*") |
| strip_executable = strip_executable |
| } |
| |
| if (invoker.type == "shared_library" && |
| filter_include([ invoker.installable_target_name ], |
| lz4_install_targets) != []) { |
| lz4_compress_install_target(target_name) { |
| forward_variables_from(invoker, "*") |
| } |
| } |
| |
| group(target_name) { |
| forward_variables_from(invoker, [ "testonly" ]) |
| deps = [ ":${target_name}_run_strip" ] |
| if (invoker.type == "shared_library" && |
| filter_include([ invoker.installable_target_name ], |
| lz4_install_targets) != []) { |
| deps += [ ":${target_name}_run_lz4_compress" ] |
| } |
| } |
| } |