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_config_utils:trace_config_utils.wasm($wasm_toolchain)", 26 "../src/trace_processor:trace_processor.wasm($wasm_toolchain)", 27 "../src/traceconv:traceconv.wasm($wasm_toolchain)", 28 ] 29} 30 31action("deprecation_warning") { 32 script = "../gn/standalone/build_tool_wrapper.py" 33 outputs = [ "$target_out_dir/never_written_always_execute_rule-2.stamp" ] 34 inputs = [] 35 args = [ 36 "cat", 37 rebase_path("config/gn_deprecation_banner.txt", root_build_dir), 38 ] 39} 40 41action("ui_build") { 42 deps = [ ":deprecation_warning" ] 43 script = "../gn/standalone/build_tool_wrapper.py" 44 outputs = [ "$target_out_dir/never_written_always_execute_rule.stamp" ] 45 inputs = [ 46 "../tools/node", 47 "build.js", 48 ] 49 args = [ 50 nodejs_bin, 51 rebase_path("build.js", root_build_dir), 52 "--out", 53 ".", 54 ] 55} 56