Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
- deps/crates/**
- deps/corepack/**
- deps/googletest/**
- deps/histogram/**
- deps/icu-small/**
- deps/icu-tmp/**
- deps/llhttp/**
Expand Down Expand Up @@ -66,6 +67,7 @@ on:
- deps/crates/**
- deps/corepack/**
- deps/googletest/**
- deps/histogram/**
- deps/icu-small/**
- deps/icu-tmp/**
- deps/llhttp/**
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ ifeq ($(SKIP_SHARED_DEPS), 1)
$(RM) -r $(TARNAME)/deps/cares
$(RM) -r $(TARNAME)/deps/crates
$(RM) -r $(TARNAME)/deps/googletest
$(RM) -r $(TARNAME)/deps/histogram
$(RM) -r $(TARNAME)/deps/icu-small
$(RM) -r $(TARNAME)/deps/icu-tmp
$(RM) -r $(TARNAME)/deps/llhttp
Expand Down
23 changes: 23 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,28 @@
dest='shared_gtest_libpath',
help='a directory to search for the shared googletest DLL')

shared_optgroup.add_argument('--shared-hdr-histogram',
action='store_true',
dest='shared_hdr_histogram',
default=None,
help='link to a shared HdrHistogram DLL instead of static linking')

shared_optgroup.add_argument('--shared-hdr-histogram-includes',
action='store',
dest='shared_hdr_histogram_includes',
help='directory containing HdrHistogram header files')

shared_optgroup.add_argument('--shared-hdr-histogram-libname',
action='store',
dest='shared_hdr_histogram_libname',
default='hdr_histogram',
help='alternative lib name to link to [default: %(default)s]')

shared_optgroup.add_argument('--shared-hdr-histogram-libpath',
action='store',
dest='shared_hdr_histogram_libpath',
help='a directory to search for the shared HdrHistogram DLL')

parser.add_argument('--experimental-http-parser',
action='store_true',
dest='experimental_http_parser',
Expand Down Expand Up @@ -2432,6 +2454,7 @@ def make_bin_override():
configure_library('brotli', output, pkgname=['libbrotlidec', 'libbrotlienc'])
configure_library('cares', output, pkgname='libcares')
configure_library('gtest', output)
configure_library('hdr_histogram', output)
configure_library('nghttp2', output, pkgname='libnghttp2')
configure_library('nghttp3', output, pkgname='libnghttp3')
configure_library('ngtcp2', output, pkgname='libngtcp2')
Expand Down
52 changes: 41 additions & 11 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'node_shared_brotli%': 'false',
'node_shared_cares%': 'false',
'node_shared_gtest%': 'false',
'node_shared_hdr_histogram%': 'false',
'node_shared_http_parser%': 'false',
'node_shared_libuv%': 'false',
'node_shared_nghttp2%': 'false',
Expand Down Expand Up @@ -572,10 +573,6 @@
'src/node_main.cc'
],

'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],

'msvs_settings': {
'VCLinkerTool': {
'GenerateMapFile': 'true', # /MAP
Expand All @@ -597,6 +594,11 @@
'msvs_disabled_warnings!': [4244],

'conditions': [
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
[ 'error_on_warn=="true"', {
'cflags': ['-Werror'],
'xcode_settings': {
Expand Down Expand Up @@ -866,7 +868,6 @@
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
],
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
'deps/nbytes/nbytes.gyp:nbytes',
'tools/v8_gypfiles/abseil.gyp:abseil',
'node_js2c#host',
Expand Down Expand Up @@ -934,6 +935,11 @@
'deps/googletest/googletest.gyp:gtest_prod',
],
}],
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
[ 'node_use_sqlite=="true"', {
'sources': [
'<@(node_sqlite_sources)',
Expand Down Expand Up @@ -1071,7 +1077,6 @@
'type': 'executable',
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
],

'includes': [
Expand All @@ -1096,6 +1101,11 @@
'test/fuzzers/fuzz_env.cc',
],
'conditions': [
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
['OS=="linux" or OS=="openharmony"', {
'ldflags': [ '-fsanitize=fuzzer' ]
}],
Expand All @@ -1114,7 +1124,6 @@
'type': 'executable',
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
],
'includes': [
'node.gypi'
Expand All @@ -1137,6 +1146,11 @@
'test/fuzzers/fuzz_ClientHelloParser.cc',
],
'conditions': [
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
[ 'node_shared_uvwasi=="false"', {
'dependencies': [ 'deps/uvwasi/uvwasi.gyp:uvwasi' ],
'include_dirs': [ 'deps/uvwasi/include' ],
Expand All @@ -1159,7 +1173,6 @@
'type': 'executable',
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
'deps/nbytes/nbytes.gyp:nbytes',
],
'includes': [
Expand Down Expand Up @@ -1188,6 +1201,11 @@
'deps/googletest/googletest.gyp:gtest_prod',
],
}],
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
[ 'node_shared_uvwasi=="false"', {
'dependencies': [ 'deps/uvwasi/uvwasi.gyp:uvwasi' ],
'include_dirs': [ 'deps/uvwasi/include' ],
Expand All @@ -1211,7 +1229,6 @@

'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
'deps/nbytes/nbytes.gyp:nbytes',
'tools/v8_gypfiles/abseil.gyp:abseil',
],
Expand Down Expand Up @@ -1247,6 +1264,11 @@
[ 'node_shared_gtest=="true"', {
'libraries': [ '-lgtest_main' ],
}],
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
[ 'node_use_openssl=="true"', {
'defines': [
'HAVE_OPENSSL=1',
Expand Down Expand Up @@ -1307,7 +1329,6 @@

'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
'deps/nbytes/nbytes.gyp:nbytes',
],

Expand Down Expand Up @@ -1343,6 +1364,11 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
Expand Down Expand Up @@ -1429,7 +1455,6 @@

'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
'deps/nbytes/nbytes.gyp:nbytes',
],

Expand Down Expand Up @@ -1462,6 +1487,11 @@
['node_write_snapshot_as_array_literals=="true"', {
'defines': [ 'NODE_MKSNAPSHOT_USE_ARRAY_LITERALS=1' ],
}],
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
[ 'node_use_openssl=="true"', {
'dependencies': [
'deps/ncrypto/ncrypto.gyp:ncrypto',
Expand Down
1 change: 1 addition & 0 deletions tools/nix/sharedLibDeps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
zlib
zstd
;
hdr-histogram = pkgs.hdrhistogram_c;
http-parser = pkgs.llhttp;
nghttp2 = pkgs.nghttp2.overrideAttrs {
patches = [
Expand Down
Loading