# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if (current_toolchain == host_toolchain) {
  executable("trace_to_text_host") {
    testonly = true
    deps = [
      "../../gn:default_deps",
      "../../gn:protobuf_full_deps",
      "../../protos/perfetto/trace:lite",
    ]
    sources = [
      "main.cc",
    ]
  }
}

copy("trace_to_text") {
  testonly = true
  host_out_dir_ =
      get_label_info(":trace_to_text_host($host_toolchain)", "root_out_dir")
  deps = [
    ":trace_to_text_host($host_toolchain)",
  ]
  sources = [
    "${host_out_dir_}/trace_to_text_host",
  ]
  outputs = [
    "${root_out_dir}/trace_to_text",
  ]
}
