Skip to content

Commit ec45b95

Browse files
legendecasnodejs-github-bot
authored andcommitted
deps: add perfetto build files
PR-URL: #62397 Refs: nodejs/diagnostics#654 Refs: https://issues.chromium.org/issues/457135433 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent f01f79e commit ec45b95

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed

deps/perfetto/BUILD.gn

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
##############################################################################
2+
# #
3+
# DO NOT EDIT THIS FILE! #
4+
# #
5+
##############################################################################
6+
7+
# This file is used by GN for building, which is NOT the build system used for
8+
# building official binaries.
9+
# Please modify the gyp files if you are making changes to build system.
10+
11+
import("unofficial.gni")
12+
13+
perfetto_sdk_gn_build("perfetto_sdk") {
14+
}

deps/perfetto/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0

deps/perfetto/perfetto.gyp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
'variables': {
3+
'perfetto_sdk_sources': [
4+
'sdk/perfetto.cc',
5+
'sdk/perfetto.h',
6+
]
7+
},
8+
'targets': [
9+
{
10+
'target_name': 'perfetto_sdk',
11+
'type': 'static_library',
12+
'include_dirs': [ 'sdk' ],
13+
'direct_dependent_settings': {
14+
# Use like `#include "perfetto.h"`
15+
'include_dirs': [ 'sdk' ],
16+
},
17+
'sources': [
18+
'<@(perfetto_sdk_sources)',
19+
],
20+
},
21+
]
22+
}

deps/perfetto/unofficial.gni

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file is used by GN for building, which is NOT the build system used for
2+
# building official binaries.
3+
# Please edit the gyp files if you are making changes to build system.
4+
5+
# The actual configurations are put inside a template in unofficial.gni to
6+
# prevent accidental edits from contributors.
7+
template("perfetto_sdk_gn_build") {
8+
config("perfetto_sdk_config") {
9+
include_dirs = [ "./sdk" ]
10+
}
11+
12+
gypi_values = exec_script("../../tools/gypi_to_gn.py",
13+
[ rebase_path("perfetto.gyp") ],
14+
"scope",
15+
[ "perfetto.gyp" ])
16+
17+
source_set(target_name) {
18+
forward_variables_from(invoker, "*")
19+
public_configs = [ ":perfetto_sdk_config" ]
20+
sources = gypi_values.perfetto_sdk_sources
21+
}
22+
}

0 commit comments

Comments
 (0)