Skip to content

Commit

Permalink
build: implement node_use_amaro flag in GN build
Browse files Browse the repository at this point in the history
PR-URL: #55798
Refs: #54136
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
zcbenz authored and ruyadorno committed Nov 27, 2024
1 parent 2b64b0e commit 2459ac0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions node.gni
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ declare_args() {
# 1. cross-os compilation is not supported.
# 2. node_mksnapshot crashes when cross-compiling for x64 from arm64.
node_use_node_snapshot = (host_os == target_os) && !(host_cpu == "arm64" && target_cpu == "x64")

# Build with Amaro (TypeScript utils).
node_use_amaro = true
}

assert(!node_enable_inspector || node_use_openssl,
Expand Down
1 change: 1 addition & 0 deletions tools/generate_config_gypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def translate_config(out_dir, config, v8_config):
eval(config['node_builtin_shareable_builtins']),
'node_module_version': int(config['node_module_version']),
'node_use_openssl': config['node_use_openssl'],
'node_use_amaro': config['node_use_amaro'],
'node_use_node_code_cache': config['node_use_node_code_cache'],
'node_use_node_snapshot': config['node_use_node_snapshot'],
'v8_enable_inspector': # this is actually a node misnomer
Expand Down
5 changes: 5 additions & 0 deletions unofficial.gni
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ template("node_gn_build") {
} else {
defines += [ "HAVE_OPENSSL=0" ]
}
if (node_use_amaro) {
defines += [ "HAVE_AMARO=1" ]
} else {
defines += [ "HAVE_AMARO=0" ]
}
if (node_use_v8_platform) {
defines += [ "NODE_USE_V8_PLATFORM=1" ]
} else {
Expand Down

0 comments on commit 2459ac0

Please sign in to comment.