xref: /aosp_15_r20/external/angle/build/config/fuchsia/sizes.gni (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1# Copyright 2020 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5assert(is_fuchsia)
6
7import("//build/util/generate_wrapper.gni")
8
9template("compute_fuchsia_package_sizes") {
10  generate_wrapper(target_name) {
11    forward_variables_from(invoker,
12                           [
13                             "data",
14                             "data_deps",
15                           ])
16    testonly = true
17    executable = "//build/fuchsia/binary_sizes.py"
18    wrapper_script = "$root_out_dir/bin/run_${target_name}"
19
20    assert(target_cpu == "arm64" || target_cpu == "x64",
21           "target_cpu must be arm64 or x64")
22
23    if (!defined(data)) {
24      data = []
25    }
26
27    if (!defined(data_deps)) {
28      data_deps = []
29    }
30
31    # Declares the files that are needed for test execution on the
32    # swarming test client. Note, fuchsia-arm64 is also running binary-sizes,
33    # so the arm64 tools are included.
34    data += [
35      "//build/fuchsia/",
36      "//tools/fuchsia/size_tests/",
37      "//third_party/fuchsia-sdk/sdk/tools/arm64/",
38      "//third_party/fuchsia-sdk/sdk/tools/x64/",
39    ]
40
41    executable_args = [
42      "--output-directory",
43      "@WrappedPath(.)",
44    ]
45    if (defined(invoker.executable_args)) {
46      executable_args += invoker.executable_args
47    }
48  }
49}
50