summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/build/config/fuchsia/sizes.gni
blob: 20a5bf831e3a35c2f4e4a42630cbf1bdb04f36d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright 2020 The Chromium 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("//build/util/generate_wrapper.gni")

template("compute_fuchsia_package_sizes") {
  generate_wrapper(target_name) {
    forward_variables_from(invoker,
                           [
                             "data",
                             "data_deps",
                           ])
    testonly = true
    executable = "//build/fuchsia/binary_sizes.py"
    wrapper_script = "$root_out_dir/bin/run_${target_name}"

    assert(target_cpu == "arm64" || target_cpu == "x64",
           "target_cpu must be arm64 or x64")

    if (!defined(data)) {
      data = []
    }

    if (!defined(data_deps)) {
      data_deps = []
    }

    # Declares the files that are needed for test execution on the
    # swarming test client.
    data += [
      "//build/fuchsia/",
      "//fuchsia/release/size_tests/",
      "//third_party/fuchsia-sdk/sdk/arch/",
      "//third_party/fuchsia-sdk/sdk/tools/${target_cpu}/",
    ]

    executable_args = [
      "--output-directory",
      "@WrappedPath(.)",
    ]
    if (defined(invoker.executable_args)) {
      executable_args += invoker.executable_args
    }
  }
}