mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
build: speed up compilation of some V8 files
This introduces a special target to compile some of the 'v8_initializers' files with "-O1" instead of "-O3" to avoid huge compilation times with GCC versions <13. PR-URL: https://github.com/nodejs/node/pull/52083 Fixes: https://github.com/nodejs/node/issues/52068 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me>
This commit is contained in:
@@ -253,12 +253,41 @@
|
||||
'<(V8_ROOT)/src/init/setup-isolate-full.cc',
|
||||
],
|
||||
}, # v8_init
|
||||
{
|
||||
# This target is used to work around a GCC issue that causes the
|
||||
# compilation to take several minutes when using -O2 or -O3.
|
||||
# This is fixed in GCC 13.
|
||||
'target_name': 'v8_initializers_slow',
|
||||
'type': 'static_library',
|
||||
'toolsets': ['host', 'target'],
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
],
|
||||
'cflags!': ['-O3'],
|
||||
'cflags': ['-O1'],
|
||||
'sources': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/src/builtins/js-to-wasm-tq-csa.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/src/builtins/js-to-wasm-tq-csa.cc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/src/builtins/wasm-to-js-tq-csa.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/src/builtins/wasm-to-js-tq-csa.cc',
|
||||
],
|
||||
'conditions': [
|
||||
['v8_enable_i18n_support==1', {
|
||||
'dependencies': [
|
||||
'<(icu_gyp_path):icui18n',
|
||||
'<(icu_gyp_path):icuuc',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, # v8_initializers_slow
|
||||
{
|
||||
'target_name': 'v8_initializers',
|
||||
'type': 'static_library',
|
||||
'toolsets': ['host', 'target'],
|
||||
'dependencies': [
|
||||
'torque_generated_initializers',
|
||||
'v8_initializers_slow',
|
||||
'v8_base_without_compiler',
|
||||
'v8_shared_internal_headers',
|
||||
'v8_pch',
|
||||
@@ -267,6 +296,13 @@
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
'<(generate_bytecode_output_root)',
|
||||
],
|
||||
# Compiled by v8_initializers_slow target.
|
||||
'sources!': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/src/builtins/js-to-wasm-tq-csa.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/src/builtins/js-to-wasm-tq-csa.cc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/src/builtins/wasm-to-js-tq-csa.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/src/builtins/wasm-to-js-tq-csa.cc',
|
||||
],
|
||||
'sources': [
|
||||
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_initializers.*?sources = ")',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user