28 Commits

Author SHA1 Message Date
Joyee Cheung
12fad1bd7b src: build v8 tick processor as built-in source text modules
Instead of polyfilling it with vm.SourceTextModule,
use a built-in source text module loader so that we can
also build the code cache for it at build tiem to
embed the code cache for them in the binary.

Drive-by: instead of inferring how to compile a particular
built-in at run time, do the inferring at build time,
so the function-based built-ins can be compiled using
parameters quickly looked up from a static map, and
the builtins that should be compiled as source text
modules are known internally based on extension in
the source code (at run time, the extensions are all
removed).

PR-URL: https://github.com/nodejs/node/pull/60518
Reviewed-By: Aditi Singh <aditisingh1400@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-11-11 02:53:13 +00:00
Shelley Vohr
21eac793cd build: fix node_use_sqlite for GN builds
PR-URL: https://github.com/nodejs/node/pull/59017
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-08-09 00:22:24 +00:00
Shelley Vohr
98da424ac4 build: option to use custom inspector_protocol path
PR-URL: https://github.com/nodejs/node/pull/58839
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-06-28 09:23:18 +00:00
Cheng
44e2671b44 build: fix GN build failure
PR-URL: https://github.com/nodejs/node/pull/57013
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-02-15 12:11:49 +00:00
Cheng
19bfc83354 build: link with Security.framework in GN build
PR-URL: https://github.com/nodejs/node/pull/56895
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-02-07 10:35:10 +09:00
Cheng
6aa42f9cf0 build: do not put commands in sources variables
PR-URL: https://github.com/nodejs/node/pull/56885
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-02-05 02:26:24 +00:00
Cheng
51c8fbb686 inspector: fix GN build
PR-URL: https://github.com/nodejs/node/pull/56798
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-30 06:44:39 +00:00
Shelley Vohr
a1d980c4e0 build: use variable for simdutf path
PR-URL: https://github.com/nodejs/node/pull/56196
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Cheng Zhao <zcbenz@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-12-11 15:35:48 +00:00
Joyee Cheung
3837c8d71e build: fix GN build on macOS
use_gold is not defined on macOS.

PR-URL: https://github.com/nodejs/node/pull/56141
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2024-12-09 10:01:55 +00:00
Shelley Vohr
0ba264ff4a build: set node_arch to target_cpu in GN
PR-URL: https://github.com/nodejs/node/pull/55967
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2024-11-26 10:01:09 +00:00
Shelley Vohr
d3bcb97e5a build: use variable for crypto dep path
PR-URL: https://github.com/nodejs/node/pull/55928
Reviewed-By: Cheng Zhao <zcbenz@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-23 11:06:02 +00:00
Cheng
57f23b4050 build: implement node_use_amaro flag in GN build
PR-URL: https://github.com/nodejs/node/pull/55798
Refs: https://github.com/nodejs/node/pull/54136
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-11-11 04:33:06 +00:00
Cheng
e90704cd9e build: fix GN build for cares/uv deps
PR-URL: https://github.com/nodejs/node/pull/55477
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-10-23 03:48:59 +00:00
Leszek Swirski
9d0748c5df build: disable ICF for mksnapshot
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5447267
Co-authored-by: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:04:25 +02:00
James M Snell
efe5b81df9 deps: start working on ncrypto dep
Start moving src/crypto functionality out to a separate dep that
can be shared with other projects that need to emulate Node.js
crypto behavior.

PR-URL: https://github.com/nodejs/node/pull/53803
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-07-18 06:56:53 -07:00
Cheng
1392d9c2d6 tools: use v8_features.json to populate config.gypi
PR-URL: https://github.com/nodejs/node/pull/53749
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-07-15 23:47:00 +00:00
Cheng
7e80584829 build: add gn files for deps/nbytes
PR-URL: https://github.com/nodejs/node/pull/53685
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-07 14:19:30 +09:00
cjihrig
3d09e579d3 deps,lib,src: add experimental web storage
This commit introduces an experimental implementation of the Web
Storage API using SQLite as the backing data store.

PR-URL: https://github.com/nodejs/node/pull/52435
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-06-14 18:40:04 +00:00
Cheng
067ab06f21 build: fix building embedtest in GN build
PR-URL: https://github.com/nodejs/node/pull/53145
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-05-28 19:24:00 +09:00
Cheng
95c16b2baf build: drop base64 dep in GN build
PR-URL: https://github.com/nodejs/node/pull/52856
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-05-08 01:43:25 +00:00
Cheng
77db3911be build: make simdjson a public dep in GN build
PR-URL: https://github.com/nodejs/node/pull/52755
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-05-05 04:06:24 +00:00
Cheng Zhao
384fd17876 build: fix arm64 host cross-compilation in GN
Should use `current_cpu` instead of `target_cpu` in GN build files,
otherwise the host build may use wrong configs when doing cross
compilation.

PR-URL: https://github.com/nodejs/node/pull/51903
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-03-06 11:11:52 +09:00
Cheng Zhao
b1468d21ee build,tools: make addons tests work with GN
PR-URL: https://github.com/nodejs/node/pull/50737
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-02-23 16:14:42 +09:00
Cheng Zhao
0992002d99 build: fix building js2c with GN
This is a follow-up to https://github.com/nodejs/node/pull/51605.

PR-URL: https://github.com/nodejs/node/pull/51818
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-02-23 16:10:02 +09:00
Cheng Zhao
df16c69983 doc: the GN files should use Node's license
PR-URL: https://github.com/nodejs/node/pull/50694
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2023-12-28 20:27:05 +00:00
Cheng Zhao
0bb5d88871 v8,tools: expose necessary V8 defines
PR-URL: https://github.com/nodejs/node/pull/50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-25 04:30:50 +00:00
Cheng Zhao
1858341377 build: add GN configurations for simdjson
PR-URL: https://github.com/nodejs/node/pull/50831
Reviewed-By: Keyhan Vakil <kvakil@sylph.kvakil.me>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-21 22:39:02 +00:00
Cheng Zhao
32af45d241 build: add GN build files
PR-URL: https://github.com/nodejs/node/pull/47637
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-11-11 09:51:05 +00:00