• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2018 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../gn/perfetto.gni")
16
17# Prevent that this file is accidentally included in embedder builds.
18assert(enable_perfetto_ui)
19
20nodejs_bin = rebase_path("//tools/node", root_build_dir)
21
22group("ui") {
23  deps = [
24    ":ui_build($host_toolchain)",
25    "//src/trace_processor:trace_processor.wasm($wasm_toolchain)",
26    "//src/traceconv:traceconv.wasm($wasm_toolchain)",
27  ]
28}
29
30action("deprecation_warning") {
31  script = "../gn/standalone/build_tool_wrapper.py"
32  outputs = [ "$target_out_dir/never_written_always_execute_rule-2.stamp" ]
33  inputs = []
34  args = [
35    "cat",
36    rebase_path("config/gn_deprecation_banner.txt", root_build_dir),
37  ]
38}
39
40action("ui_build") {
41  deps = [ ":deprecation_warning" ]
42  script = "../gn/standalone/build_tool_wrapper.py"
43  outputs = [ "$target_out_dir/never_written_always_execute_rule.stamp" ]
44  inputs = [
45    "//tools/node",
46    "build.js",
47  ]
48  args = [
49    nodejs_bin,
50    rebase_path("build.js", root_build_dir),
51    "--out",
52    ".",
53  ]
54}
55