blob: 5de6da9073632a6408b296a62dbe28ccd2a05e40 [file] [log] [blame]
Hector Dearman20b3c1c2018-01-15 15:34:03 +00001# Copyright (C) 2017 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
Primiano Tucci21c19d82018-03-29 12:35:08 +010015import("../../gn/perfetto.gni")
16
17source_set("lib") {
18 testonly = true
19 deps = [
20 "../../gn:default_deps",
21 "../../gn:protobuf_full_deps",
22 "../../protos/perfetto/trace:lite",
23 ]
24 sources = [
25 "ftrace_event_formatter.cc",
26 "ftrace_event_formatter.h",
27 "ftrace_inode_handler.cc",
28 "ftrace_inode_handler.h",
29 "main.cc",
30 ]
31}
32
Primiano Tuccie8a77602018-01-16 00:14:08 +000033if (current_toolchain == host_toolchain) {
34 executable("trace_to_text_host") {
35 testonly = true
36 deps = [
Primiano Tucci21c19d82018-03-29 12:35:08 +010037 ":lib",
Primiano Tuccie8a77602018-01-16 00:14:08 +000038 "../../gn:default_deps",
Primiano Tuccie8a77602018-01-16 00:14:08 +000039 ]
40 }
41}
42
Primiano Tucci21c19d82018-03-29 12:35:08 +010043# The one for the android tree is defined in the top-level BUILD.gn.
44if (!build_with_android) {
45 copy("trace_to_text") {
46 testonly = true
47 host_out_dir_ =
48 get_label_info(":trace_to_text_host($host_toolchain)", "root_out_dir")
49 deps = [
50 ":trace_to_text_host($host_toolchain)",
51 ]
52 sources = [
53 "${host_out_dir_}/trace_to_text_host",
54 ]
55 outputs = [
56 "${root_out_dir}/trace_to_text",
57 ]
58 }
Hector Dearman20b3c1c2018-01-15 15:34:03 +000059}