# Copyright 2017 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/toolchain/toolchain.gni")

config("vtune_ittapi") {
  include_dirs = [
    "//third_party/ittapi/include",
    "//third_party/ittapi/src/ittnotify",
  ]
}

static_library("v8_vtune") {
  sources = [
    "//third_party/ittapi/include/jitprofiling.h",
    "//third_party/ittapi/src/ittnotify/ittnotify_config.h",
    "//third_party/ittapi/src/ittnotify/ittnotify_types.h",
    "//third_party/ittapi/src/ittnotify/jitprofiling.c",
    "v8-vtune.h",
    "vtune-jit.cc",
    "vtune-jit.h",
  ]
  configs += [ ":vtune_ittapi" ]
  deps = [
    "../../..:v8",
  ]
}

static_library("v8_vtune_trace_mark") {
  sources = [
    "//third_party/ittapi/include/ittnotify.h",
    "vtuneapi.cc",
    "vtuneapi.h",
  ]
  deps = [
    ":ittnotify",
  ]
}

static_library("ittnotify") {
  sources = [
    "//third_party/ittapi/include/ittnotify.h",
    "//third_party/ittapi/include/legacy/ittnotify.h",
    "//third_party/ittapi/src/ittnotify/disable-warnings.h",
    "//third_party/ittapi/src/ittnotify/ittnotify_config.h",
    "//third_party/ittapi/src/ittnotify/ittnotify_static.c",
    "//third_party/ittapi/src/ittnotify/ittnotify_static.h",
  ]
  include_dirs = [ "//third_party/ittapi/include" ]
  deps = []
}