[build] Enable gn build for vtune support in v8.
BUG= Review-Url: https://codereview.chromium.org/2688483004 Cr-Commit-Position: refs/heads/master@{#43133}
This commit is contained in:
parent
4530f0dc0c
commit
e5168c7929
12
BUILD.gn
12
BUILD.gn
@ -41,6 +41,9 @@ declare_args() {
|
||||
# Sets -dENABLE_GDB_JIT_INTERFACE.
|
||||
v8_enable_gdbjit = ""
|
||||
|
||||
# Sets -dENABLE_VTUNE_JIT_INTERFACE.
|
||||
v8_enable_vtunejit = false
|
||||
|
||||
# Sets -dENABLE_HANDLE_ZAPPING.
|
||||
v8_enable_handle_zapping = true
|
||||
|
||||
@ -197,6 +200,9 @@ config("features") {
|
||||
if (v8_enable_gdbjit) {
|
||||
defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
|
||||
}
|
||||
if (v8_enable_vtunejit) {
|
||||
defines += [ "ENABLE_VTUNE_JIT_INTERFACE" ]
|
||||
}
|
||||
if (v8_enable_object_print) {
|
||||
defines += [ "OBJECT_PRINT" ]
|
||||
}
|
||||
@ -2642,8 +2648,6 @@ v8_executable("d8") {
|
||||
"//build/win:default_exe_manifest",
|
||||
]
|
||||
|
||||
# TODO(jochen): Add support for vtunejit.
|
||||
|
||||
if (is_posix) {
|
||||
sources += [ "src/d8-posix.cc" ]
|
||||
} else if (is_win) {
|
||||
@ -2662,6 +2666,10 @@ v8_executable("d8") {
|
||||
if (v8_enable_inspector) {
|
||||
defines += [ "V8_INSPECTOR_ENABLED" ]
|
||||
}
|
||||
|
||||
if (v8_enable_vtunejit) {
|
||||
deps += [ "//src/third_party/vtune:v8_vtune" ]
|
||||
}
|
||||
}
|
||||
|
||||
v8_isolate_run("d8") {
|
||||
|
20
src/third_party/vtune/BUILD.gn
vendored
Normal file
20
src/third_party/vtune/BUILD.gn
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# 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")
|
||||
|
||||
static_library("v8_vtune") {
|
||||
sources = [
|
||||
"ittnotify_config.h",
|
||||
"ittnotify_types.h",
|
||||
"jitprofiling.cc",
|
||||
"jitprofiling.h",
|
||||
"v8-vtune.h",
|
||||
"vtune-jit.cc",
|
||||
"vtune-jit.h",
|
||||
]
|
||||
deps = [
|
||||
"//:v8",
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user