Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 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 | |
| 15 | import("../gn/perfetto.gni") |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 16 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 17 | # Prevent that this file is accidentally included in embedder builds. |
| 18 | assert(enable_perfetto_ui) |
| 19 | |
Primiano Tucci | 7e9865c | 2021-01-10 23:55:15 +0100 | [diff] [blame] | 20 | nodejs_bin = rebase_path("//tools/node", root_build_dir) |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 21 | |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 22 | group("ui") { |
| 23 | deps = [ |
Primiano Tucci | c8be681 | 2021-02-09 18:08:49 +0100 | [diff] [blame] | 24 | ":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 Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 27 | ] |
| 28 | } |
| 29 | |
Primiano Tucci | c8be681 | 2021-02-09 18:08:49 +0100 | [diff] [blame] | 30 | action("deprecation_warning") { |
| 31 | script = "../gn/standalone/build_tool_wrapper.py" |
| 32 | outputs = [ "$target_out_dir/never_written_always_execute_rule-2.stamp" ] |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 33 | inputs = [] |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 34 | args = [ |
Primiano Tucci | c8be681 | 2021-02-09 18:08:49 +0100 | [diff] [blame] | 35 | "cat", |
| 36 | rebase_path("config/gn_deprecation_banner.txt", root_build_dir), |
Primiano Tucci | 3faad74 | 2018-05-16 19:30:48 +0100 | [diff] [blame] | 37 | ] |
| 38 | } |
| 39 | |
Primiano Tucci | c8be681 | 2021-02-09 18:08:49 +0100 | [diff] [blame] | 40 | action("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 Tucci | 3552aaf | 2020-01-14 20:20:52 +0000 | [diff] [blame] | 44 | inputs = [ |
Primiano Tucci | c8be681 | 2021-02-09 18:08:49 +0100 | [diff] [blame] | 45 | "//tools/node", |
| 46 | "build.js", |
Primiano Tucci | 3552aaf | 2020-01-14 20:20:52 +0000 | [diff] [blame] | 47 | ] |
Primiano Tucci | 3552aaf | 2020-01-14 20:20:52 +0000 | [diff] [blame] | 48 | args = [ |
Primiano Tucci | c8be681 | 2021-02-09 18:08:49 +0100 | [diff] [blame] | 49 | nodejs_bin, |
| 50 | rebase_path("build.js", root_build_dir), |
| 51 | "--out", |
| 52 | ".", |
Primiano Tucci | 3552aaf | 2020-01-14 20:20:52 +0000 | [diff] [blame] | 53 | ] |
| 54 | } |