Skip to content

Commit 472d55e

Browse files
zcbenzaduh95
authored andcommitted
build: implement node_use_amaro flag in GN build
PR-URL: #55798 Refs: #54136 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent df5ea1a commit 472d55e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

node.gni

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ declare_args() {
5959
# 1. cross-os compilation is not supported.
6060
# 2. node_mksnapshot crashes when cross-compiling for x64 from arm64.
6161
node_use_node_snapshot = (host_os == target_os) && !(host_cpu == "arm64" && target_cpu == "x64")
62+
63+
# Build with Amaro (TypeScript utils).
64+
node_use_amaro = true
6265
}
6366

6467
assert(!node_enable_inspector || node_use_openssl,

tools/generate_config_gypi.py

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def translate_config(out_dir, config, v8_config):
6161
eval(config['node_builtin_shareable_builtins']),
6262
'node_module_version': int(config['node_module_version']),
6363
'node_use_openssl': config['node_use_openssl'],
64+
'node_use_amaro': config['node_use_amaro'],
6465
'node_use_node_code_cache': config['node_use_node_code_cache'],
6566
'node_use_node_snapshot': config['node_use_node_snapshot'],
6667
'v8_enable_inspector': # this is actually a node misnomer

unofficial.gni

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ template("node_gn_build") {
2222
} else {
2323
defines += [ "HAVE_OPENSSL=0" ]
2424
}
25+
if (node_use_amaro) {
26+
defines += [ "HAVE_AMARO=1" ]
27+
} else {
28+
defines += [ "HAVE_AMARO=0" ]
29+
}
2530
if (node_use_v8_platform) {
2631
defines += [ "NODE_USE_V8_PLATFORM=1" ]
2732
} else {

0 commit comments

Comments
 (0)