Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions node.gni
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,12 @@ declare_args() {
# The location of Node.js in source code tree.
node_path = "//node"

# The location of V8 - use the one from node's deps by default.
node_v8_path = "$node_path/deps/v8"

# The location of OpenSSL - use the one from node's deps by default.
node_openssl_path = "$node_path/deps/openssl"

# The location of simdutf - use the one from node's deps by default.
node_simdutf_path = "//third_party/simdutf"

# The location of inspector_protocol - use the one from node's deps by default.
node_inspector_protocol_path = "//third_party/inspector_protocol"

# The NODE_MODULE_VERSION defined in node_version.h.
node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value")

# Support for external shareable builtins.
# TODO(zcbenz): This is currently copied from configure.py, we should share
# the list between configure.py and GN configurations.
Expand All @@ -31,6 +22,22 @@ declare_args() {
]
}

# These must be declared in a separate block from `node_path`, per GN documentation
# (https://gn.googlesource.com/gn/+/main/docs/reference.md#func_declare_args):
# "you cannot read the value of a variable defined in the same block, if you need
# to make the default value of one arg depend on the possibly-overridden value of
# another, write two separate declare_args() blocks"
declare_args() {
# The location of V8 - use the one from node's deps by default.
node_v8_path = "$node_path/deps/v8"

# The location of OpenSSL - use the one from node's deps by default.
node_openssl_path = "$node_path/deps/openssl"

# The NODE_MODULE_VERSION defined in node_version.h.
node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value")
}

# Equivalent of gyp file's configurations.
declare_args() {
# Enable the V8 inspector protocol for use with node.
Expand Down
Loading