# Copyright (C) 2018 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.

import("../../gn/perfetto.gni")

protoc_target = "../../gn:protoc($host_toolchain)"

action_foreach("configs") {
  testonly = true
  script = "../../tools/protoc_helper.py"

  deps = [
    "../../protos/perfetto/trace:non_minimal_source_set",
    protoc_target,
  ]

  sources = [
    "android_log.cfg",
    "atrace.cfg",
    "background.cfg",
    "bad_config.cfg",
    "camera.cfg",
    "client_api.cfg",
    "ftrace.cfg",
    "ftrace_largebuffer.cfg",
    "ftrace_with_filter.cfg",
    "ftrace_with_ksyms.cfg",
    "heapprofd.cfg",
    "long_trace.cfg",
    "mm_events.cfg",
    "scheduling.cfg",
    "snapshot.cfg",
    "summary.cfg",
    "sys_stats.cfg",
    "thermal.cfg",
    "traced_perf.cfg",
  ]

  outputs = [ "$root_out_dir/{{source_file_part}}.protobuf" ]

  # Retrieves the path where protoc is built relative to the dir where commands
  # are ran (root_build_dir == out/xxx). protoc_rel_dir ends up being "." for
  # pure host build and "gcc_like_host" for android builds
  protoc_out_dir = get_label_info(protoc_target, "root_out_dir")
  protoc_rel_dir = rebase_path(protoc_out_dir, root_build_dir)
  protoc_ext = ""
  if (host_os == "win") {
    protoc_ext = ".exe"
  }

  args = [
    "encode",
    "--protoc=$protoc_rel_dir/protoc${protoc_ext}",
    "--input={{source}}",
    "--output={{source_file_part}}.protobuf",
  ]
}
