From 1858341377c268c5ffce9345517dc07b0e6c240a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 22 Nov 2023 07:39:02 +0900 Subject: [PATCH] build: add GN configurations for simdjson PR-URL: https://github.com/nodejs/node/pull/50831 Reviewed-By: Keyhan Vakil Reviewed-By: Marco Ippolito Reviewed-By: Yagiz Nizipli --- deps/simdjson/BUILD.gn | 14 ++++++++++++++ deps/simdjson/unofficial.gni | 22 ++++++++++++++++++++++ unofficial.gni | 1 + 3 files changed, 37 insertions(+) create mode 100644 deps/simdjson/BUILD.gn create mode 100644 deps/simdjson/unofficial.gni diff --git a/deps/simdjson/BUILD.gn b/deps/simdjson/BUILD.gn new file mode 100644 index 00000000000..d0580ccf354 --- /dev/null +++ b/deps/simdjson/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") + +simdjson_gn_build("simdjson") { +} diff --git a/deps/simdjson/unofficial.gni b/deps/simdjson/unofficial.gni new file mode 100644 index 00000000000..d6909b95886 --- /dev/null +++ b/deps/simdjson/unofficial.gni @@ -0,0 +1,22 @@ +# 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. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("simdjson_gn_build") { + config("simdjson_config") { + include_dirs = [ "." ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("simdjson.gyp") ], + "scope", + [ "simdjson.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":simdjson_config" ] + sources = gypi_values.simdjson_sources + } +} diff --git a/unofficial.gni b/unofficial.gni index 29685d4ade5..f13df9503ec 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -159,6 +159,7 @@ template("node_gn_build") { "deps/nghttp2", "deps/ngtcp2", "deps/postject", + "deps/simdjson", "deps/simdutf", "deps/uvwasi", "//third_party/zlib",