From 40032eb62351e67d87cd297e3cc7fb4652941fba Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 2 Jul 2024 14:37:01 +0900 Subject: [PATCH] build: add gn files for deps/nbytes PR-URL: https://github.com/nodejs/node/pull/53685 Reviewed-By: Yagiz Nizipli Reviewed-By: James M Snell --- deps/nbytes/BUILD.gn | 14 ++++++++++++++ deps/nbytes/unofficial.gni | 25 +++++++++++++++++++++++++ unofficial.gni | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 deps/nbytes/BUILD.gn create mode 100644 deps/nbytes/unofficial.gni diff --git a/deps/nbytes/BUILD.gn b/deps/nbytes/BUILD.gn new file mode 100644 index 00000000000000..c1db79d0e15cef --- /dev/null +++ b/deps/nbytes/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +nbytes_gn_build("nbytes") { +} diff --git a/deps/nbytes/unofficial.gni b/deps/nbytes/unofficial.gni new file mode 100644 index 00000000000000..bdec67c93f1df1 --- /dev/null +++ b/deps/nbytes/unofficial.gni @@ -0,0 +1,25 @@ +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +import("../../node.gni") +import("$node_v8_path/gni/v8.gni") + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("nbytes_gn_build") { + config("nbytes_config") { + include_dirs = [ "." ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("nbytes.gyp") ], + "scope", + [ "nbytes.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":nbytes_config" ] + sources = gypi_values.nbytes_sources + } +} diff --git a/unofficial.gni b/unofficial.gni index 3782253ac4c393..f846c989726f23 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -148,6 +148,7 @@ template("node_gn_build") { "deps/cares", "deps/histogram", "deps/llhttp", + "deps/nbytes", "deps/nghttp2", "deps/ngtcp2", "deps/postject", @@ -331,6 +332,7 @@ template("node_gn_build") { ":libnode", "deps/googletest", "deps/googletest:gtest_main", + "deps/nbytes", "deps/simdutf", ]