Skip to content

Commit 4055c03

Browse files
committed
build: add --shared-abseil configure flag
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent e68a93a commit 4055c03

10 files changed

Lines changed: 415 additions & 29 deletions

File tree

‎.github/workflows/test-shared.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ on:
3333
- deps/sqlite/**
3434
- deps/uv/**
3535
- deps/uvwasi/**
36+
- deps/v8/third_party/abseil-cpp/**
3637
- deps/zlib/**
3738
- deps/zstd/**
3839
- doc/**
@@ -86,6 +87,7 @@ on:
8687
- deps/sqlite/**
8788
- deps/uv/**
8889
- deps/uvwasi/**
90+
- deps/v8/third_party/abseil-cpp/**
8991
- deps/zlib/**
9092
- deps/zstd/**
9193
- doc/**

‎Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,7 @@ ifeq ($(SKIP_SHARED_DEPS), 1)
13161316
$(RM) -r $(TARNAME)/deps/sqlite
13171317
$(RM) -r $(TARNAME)/deps/uv
13181318
$(RM) -r $(TARNAME)/deps/uvwasi
1319+
$(RM) -r $(TARNAME)/deps/v8/third_party/abseil-cpp
13191320
$(RM) -r $(TARNAME)/deps/zlib
13201321
$(RM) -r $(TARNAME)/deps/zstd
13211322
else

‎configure.py‎

Lines changed: 332 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,122 @@
282282
help='Use the specified path to system CA (PEM format) in addition to '
283283
'the OpenSSL supplied CA store or compiled-in Mozilla CA copy.')
284284

285+
shared_optgroup.add_argument('--shared-abseil',
286+
action='store_true',
287+
dest='shared_abseil',
288+
default=None,
289+
help='link to a shared googletest DLL instead of static linking')
290+
291+
shared_optgroup.add_argument('--shared-abseil-includes',
292+
action='store',
293+
dest='shared_abseil_includes',
294+
help='directory containing googletest header files')
295+
296+
shared_optgroup.add_argument('--shared-abseil-libname',
297+
action='store',
298+
dest='shared_abseil_libname',
299+
default=','.join([
300+
'absl_base',
301+
'absl_borrowed_fixup_buffer',
302+
'absl_city',
303+
'absl_civil_time',
304+
'absl_cord_internal',
305+
'absl_cord',
306+
'absl_cordz_functions',
307+
'absl_cordz_handle',
308+
'absl_cordz_info',
309+
'absl_cordz_sample_token',
310+
'absl_crc_cord_state',
311+
'absl_crc_cpu_detect',
312+
'absl_crc_internal',
313+
'absl_crc32c',
314+
'absl_debugging_internal',
315+
'absl_decode_rust_punycode',
316+
'absl_demangle_internal',
317+
'absl_demangle_rust',
318+
'absl_die_if_null',
319+
'absl_examine_stack',
320+
'absl_exponential_biased',
321+
'absl_failure_signal_handler',
322+
'absl_flags_commandlineflag_internal',
323+
'absl_flags_commandlineflag',
324+
'absl_flags_config',
325+
'absl_flags_internal',
326+
'absl_flags_marshalling',
327+
'absl_flags_parse',
328+
'absl_flags_private_handle_accessor',
329+
'absl_flags_program_name',
330+
'absl_flags_reflection',
331+
'absl_flags_usage_internal',
332+
'absl_flags_usage',
333+
'absl_generic_printer_internal',
334+
'absl_graphcycles_internal',
335+
'absl_hash',
336+
'absl_hashtable_profiler',
337+
'absl_hashtablez_sampler',
338+
'absl_int128',
339+
'absl_kernel_timeout_internal',
340+
'absl_leak_check',
341+
'absl_log_entry',
342+
'absl_log_flags',
343+
'absl_log_globals',
344+
'absl_log_initialize',
345+
'absl_log_internal_check_op',
346+
'absl_log_internal_conditions',
347+
'absl_log_internal_fnmatch',
348+
'absl_log_internal_format',
349+
'absl_log_internal_globals',
350+
'absl_log_internal_log_sink_set',
351+
'absl_log_internal_message',
352+
'absl_log_internal_nullguard',
353+
'absl_log_internal_proto',
354+
'absl_log_internal_structured_proto',
355+
'absl_log_severity',
356+
'absl_log_sink',
357+
'absl_malloc_internal',
358+
'absl_periodic_sampler',
359+
'absl_poison',
360+
'absl_profile_builder',
361+
'absl_random_distributions',
362+
'absl_random_internal_distribution_test_util',
363+
'absl_random_internal_entropy_pool',
364+
'absl_random_internal_platform',
365+
'absl_random_internal_randen_hwaes_impl',
366+
'absl_random_internal_randen_hwaes',
367+
'absl_random_internal_randen_slow',
368+
'absl_random_internal_randen',
369+
'absl_random_internal_seed_material',
370+
'absl_random_seed_gen_exception',
371+
'absl_random_seed_sequences',
372+
'absl_raw_hash_set',
373+
'absl_raw_logging_internal',
374+
'absl_scoped_mock_log',
375+
'absl_scoped_set_env',
376+
'absl_spinlock_wait',
377+
'absl_stacktrace',
378+
'absl_status_matchers',
379+
'absl_status',
380+
'absl_statusor',
381+
'absl_str_format_internal',
382+
'absl_strerror',
383+
'absl_strings_internal',
384+
'absl_strings',
385+
'absl_symbolize',
386+
'absl_synchronization',
387+
'absl_throw_delegate',
388+
'absl_time_zone',
389+
'absl_time',
390+
'absl_tracing_internal',
391+
'absl_utf8_for_code_point',
392+
'absl_vlog_config_internal',
393+
]),
394+
help='alternative lib name to link to [default: %(default)s]')
395+
396+
shared_optgroup.add_argument('--shared-abseil-libpath',
397+
action='store',
398+
dest='shared_abseil_libpath',
399+
help='a directory to search for the shared googletest DLL')
400+
285401
shared_optgroup.add_argument('--shared-gtest',
286402
action='store_true',
287403
dest='shared_gtest',
@@ -2814,6 +2930,222 @@ def make_bin_override():
28142930
configure_library('zlib', output)
28152931
configure_library('http_parser', output, pkgname='libllhttp')
28162932
configure_library('libuv', output)
2933+
configure_library('abseil', output, pkgname=[
2934+
'absl_absl_check',
2935+
'absl_absl_log',
2936+
'absl_absl_vlog_is_on',
2937+
'absl_algorithm_container',
2938+
'absl_algorithm',
2939+
'absl_any_invocable',
2940+
'absl_any',
2941+
'absl_atomic_hook',
2942+
'absl_bad_any_cast',
2943+
'absl_bad_optional_access',
2944+
'absl_bad_variant_access',
2945+
'absl_base_internal',
2946+
'absl_base',
2947+
'absl_bind_front',
2948+
'absl_bits',
2949+
'absl_borrowed_fixup_buffer',
2950+
'absl_bounded_utf8_length_sequence',
2951+
'absl_btree',
2952+
'absl_charset',
2953+
'absl_check',
2954+
'absl_chunked_queue',
2955+
'absl_city',
2956+
'absl_civil_time',
2957+
'absl_cleanup_internal',
2958+
'absl_cleanup',
2959+
'absl_common_policy_traits',
2960+
'absl_compare',
2961+
'absl_compressed_tuple',
2962+
'absl_config',
2963+
'absl_constexpr_testing_internal',
2964+
'absl_container_common',
2965+
'absl_container_memory',
2966+
'absl_cord_internal',
2967+
'absl_cord_test_helpers',
2968+
'absl_cord',
2969+
'absl_cordz_functions',
2970+
'absl_cordz_handle',
2971+
'absl_cordz_info',
2972+
'absl_cordz_sample_token',
2973+
'absl_cordz_statistics',
2974+
'absl_cordz_update_scope',
2975+
'absl_cordz_update_tracker',
2976+
'absl_core_headers',
2977+
'absl_crc_cord_state',
2978+
'absl_crc_cpu_detect',
2979+
'absl_crc_internal',
2980+
'absl_crc32c',
2981+
'absl_debugging_internal',
2982+
'absl_debugging',
2983+
'absl_decode_rust_punycode',
2984+
'absl_demangle_internal',
2985+
'absl_demangle_rust',
2986+
'absl_die_if_null',
2987+
'absl_dynamic_annotations',
2988+
'absl_endian',
2989+
'absl_errno_saver',
2990+
'absl_examine_stack',
2991+
'absl_exponential_biased',
2992+
'absl_failure_signal_handler',
2993+
'absl_fast_type_id',
2994+
'absl_fixed_array',
2995+
'absl_flags_commandlineflag_internal',
2996+
'absl_flags_commandlineflag',
2997+
'absl_flags_config',
2998+
'absl_flags_internal',
2999+
'absl_flags_marshalling',
3000+
'absl_flags_parse',
3001+
'absl_flags_path_util',
3002+
'absl_flags_private_handle_accessor',
3003+
'absl_flags_program_name',
3004+
'absl_flags_reflection',
3005+
'absl_flags_usage_internal',
3006+
'absl_flags_usage',
3007+
'absl_flags',
3008+
'absl_flat_hash_map',
3009+
'absl_flat_hash_set',
3010+
'absl_function_ref',
3011+
'absl_generic_printer_internal',
3012+
'absl_graphcycles_internal',
3013+
'absl_has_ostream_operator',
3014+
'absl_hash_container_defaults',
3015+
'absl_hash_function_defaults',
3016+
'absl_hash_policy_traits',
3017+
'absl_hash_testing',
3018+
'absl_hash',
3019+
'absl_hashtable_control_bytes',
3020+
'absl_hashtable_debug_hooks',
3021+
'absl_hashtable_debug',
3022+
'absl_hashtable_profiler',
3023+
'absl_hashtablez_sampler',
3024+
'absl_heterogeneous_lookup_testing',
3025+
'absl_inlined_vector_internal',
3026+
'absl_inlined_vector',
3027+
'absl_int128',
3028+
'absl_iterator_traits_internal',
3029+
'absl_iterator_traits_test_helper_internal',
3030+
'absl_kernel_timeout_internal',
3031+
'absl_layout',
3032+
'absl_leak_check',
3033+
'absl_linked_hash_map',
3034+
'absl_linked_hash_set',
3035+
'absl_log_entry',
3036+
'absl_log_flags',
3037+
'absl_log_globals',
3038+
'absl_log_initialize',
3039+
'absl_log_internal_append_truncated',
3040+
'absl_log_internal_check_impl',
3041+
'absl_log_internal_check_op',
3042+
'absl_log_internal_conditions',
3043+
'absl_log_internal_config',
3044+
'absl_log_internal_container',
3045+
'absl_log_internal_flags',
3046+
'absl_log_internal_fnmatch',
3047+
'absl_log_internal_format',
3048+
'absl_log_internal_globals',
3049+
'absl_log_internal_log_impl',
3050+
'absl_log_internal_log_sink_set',
3051+
'absl_log_internal_message',
3052+
'absl_log_internal_nullguard',
3053+
'absl_log_internal_nullstream',
3054+
'absl_log_internal_proto',
3055+
'absl_log_internal_strip',
3056+
'absl_log_internal_structured_proto',
3057+
'absl_log_internal_structured',
3058+
'absl_log_internal_voidify',
3059+
'absl_log_severity',
3060+
'absl_log_sink_registry',
3061+
'absl_log_sink',
3062+
'absl_log_streamer',
3063+
'absl_log_structured',
3064+
'absl_log',
3065+
'absl_malloc_internal',
3066+
'absl_memory',
3067+
'absl_meta',
3068+
'absl_no_destructor',
3069+
'absl_node_hash_map',
3070+
'absl_node_hash_set',
3071+
'absl_node_slot_policy',
3072+
'absl_non_temporal_arm_intrinsics',
3073+
'absl_non_temporal_memcpy',
3074+
'absl_nullability_traits_internal',
3075+
'absl_nullability',
3076+
'absl_numeric_representation'
3077+
'absl_numeric'
3078+
'absl_optional',
3079+
'absl_overload',
3080+
'absl_periodic_sampler',
3081+
'absl_poison',
3082+
'absl_prefetch',
3083+
'absl_pretty_function',
3084+
'absl_profile_builder',
3085+
'absl_random_bit_gen_ref',
3086+
'absl_random_distributions',
3087+
'absl_random_internal_distribution_caller',
3088+
'absl_random_internal_distribution_test_util',
3089+
'absl_random_internal_entropy_pool',
3090+
'absl_random_internal_fast_uniform_bits',
3091+
'absl_random_internal_fastmath',
3092+
'absl_random_internal_generate_real',
3093+
'absl_random_internal_iostream_state_saver',
3094+
'absl_random_internal_mock_helpers',
3095+
'absl_random_internal_nonsecure_base',
3096+
'absl_random_internal_pcg_engine',
3097+
'absl_random_internal_platform',
3098+
'absl_random_internal_randen_engine',
3099+
'absl_random_internal_randen_hwaes_impl',
3100+
'absl_random_internal_randen_hwaes',
3101+
'absl_random_internal_randen_slow',
3102+
'absl_random_internal_randen',
3103+
'absl_random_internal_salted_seed_seq',
3104+
'absl_random_internal_seed_material',
3105+
'absl_random_internal_traits',
3106+
'absl_random_internal_uniform_helper',
3107+
'absl_random_internal_wide_multiply',
3108+
'absl_random_mocking_bit_gen',
3109+
'absl_random_random',
3110+
'absl_random_seed_gen_exception',
3111+
'absl_random_seed_sequences',
3112+
'absl_raw_hash_map',
3113+
'absl_raw_hash_set_resize_impl',
3114+
'absl_raw_hash_set',
3115+
'absl_raw_logging_internal',
3116+
'absl_requires_internal',
3117+
'absl_sample_recorder',
3118+
'absl_scoped_mock_log',
3119+
'absl_scoped_set_env',
3120+
'absl_span',
3121+
'absl_spinlock_wait',
3122+
'absl_spy_hash_state',
3123+
'absl_stacktrace',
3124+
'absl_status_matchers',
3125+
'absl_status',
3126+
'absl_statusor',
3127+
'absl_str_format_internal',
3128+
'absl_str_format',
3129+
'absl_strerror',
3130+
'absl_string_view',
3131+
'absl_strings_append_and_overwrite',
3132+
'absl_strings_internal',
3133+
'absl_strings_resize_and_overwrite',
3134+
'absl_strings',
3135+
'absl_symbolize',
3136+
'absl_synchronization',
3137+
'absl_throw_delegate',
3138+
'absl_time_zone',
3139+
'absl_time',
3140+
'absl_tracing_internal',
3141+
'absl_type_traits',
3142+
'absl_utf8_for_code_point',
3143+
'absl_utility',
3144+
'absl_variant',
3145+
'absl_vlog_config_internal',
3146+
'absl_vlog_is_on',
3147+
'absl_weakly_mixed_integer',
3148+
])
28173149
configure_library('ada', output)
28183150
configure_library('simdjson', output)
28193151
configure_library('simdutf', output)

‎node.gyp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'node_lib_target_name%': 'libnode',
1616
'node_module_version%': '',
1717
'node_no_browser_globals%': 'false',
18+
'node_shared_abseil%': 'false',
1819
'node_shared_brotli%': 'false',
1920
'node_shared_cares%': 'false',
2021
'node_shared_gtest%': 'false',
@@ -899,7 +900,7 @@
899900
[ 'node_builtin_modules_path!=""', {
900901
'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ],
901902
}],
902-
[ 'node_use_bundled_v8!="false"', {
903+
[ 'node_use_bundled_v8!="false" and node_shared_abseil=="false"', {
903904
'dependencies': [ 'tools/v8_gypfiles/abseil.gyp:abseil' ],
904905
}],
905906
[ 'node_shared_gtest=="false"', {
@@ -1367,7 +1368,7 @@
13671368
[ 'node_shared_gtest=="true"', {
13681369
'libraries': [ '-lgtest_main' ],
13691370
}],
1370-
[ 'node_use_bundled_v8!="false"', {
1371+
[ 'node_use_bundled_v8!="false" and node_shared_abseil=="false"', {
13711372
'dependencies': [ 'tools/v8_gypfiles/abseil.gyp:abseil' ],
13721373
}],
13731374
[ 'node_shared_hdr_histogram=="false"', {

0 commit comments

Comments
 (0)