blob: 98aeb5b2d2849a439f6c0b3f706e947836dcfa6a [file] [log] [blame]
Primiano Tucci3faad742018-05-16 19:30:48 +01001# 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")
Primiano Tucci3faad742018-05-16 19:30:48 +010016
Primiano Tucci02c11762019-08-30 00:57:59 +020017# Prevent that this file is accidentally included in embedder builds.
18assert(enable_perfetto_ui)
19
Primiano Tucci7e9865c2021-01-10 23:55:15 +010020nodejs_bin = rebase_path("//tools/node", root_build_dir)
Primiano Tucci3faad742018-05-16 19:30:48 +010021
Primiano Tucci3faad742018-05-16 19:30:48 +010022group("ui") {
23 deps = [
Primiano Tuccic8be6812021-02-09 18:08:49 +010024 ":ui_build($host_toolchain)",
25 "//src/trace_processor:trace_processor.wasm($wasm_toolchain)",
26 "//tools/trace_to_text:trace_to_text.wasm($wasm_toolchain)",
Primiano Tucci3faad742018-05-16 19:30:48 +010027 ]
28}
29
Primiano Tuccic8be6812021-02-09 18:08:49 +010030action("deprecation_warning") {
31 script = "../gn/standalone/build_tool_wrapper.py"
32 outputs = [ "$target_out_dir/never_written_always_execute_rule-2.stamp" ]
Primiano Tucci3faad742018-05-16 19:30:48 +010033 inputs = []
Primiano Tucci3faad742018-05-16 19:30:48 +010034 args = [
Primiano Tuccic8be6812021-02-09 18:08:49 +010035 "cat",
36 rebase_path("config/gn_deprecation_banner.txt", root_build_dir),
Primiano Tucci3faad742018-05-16 19:30:48 +010037 ]
38}
39
Primiano Tuccic8be6812021-02-09 18:08:49 +010040action("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" ]
Primiano Tucci3552aaf2020-01-14 20:20:52 +000044 inputs = [
Primiano Tuccic8be6812021-02-09 18:08:49 +010045 "//tools/node",
46 "build.js",
Primiano Tucci3552aaf2020-01-14 20:20:52 +000047 ]
Primiano Tucci3552aaf2020-01-14 20:20:52 +000048 args = [
Primiano Tuccic8be6812021-02-09 18:08:49 +010049 nodejs_bin,
50 rebase_path("build.js", root_build_dir),
51 "--out",
52 ".",
Primiano Tucci3552aaf2020-01-14 20:20:52 +000053 ]
54}