build: do not use bundled simdutf when built with --shared-simdutf

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65891
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
This commit is contained in:
Antoine du Hamel committed 2026-09-18 17:41:08 +02:00
1 parent d62a452738
commit 01cee9dcef
10 files changed
+44 -22

No files matched your search

+2
View File
@@ -36,6 +36,7 @@ on:
- deps/uvwasi/**
- deps/v8/third_party/abseil-cpp/**
- deps/v8/third_party/highway/**
- deps/v8/third_party/simdutf/**
- deps/zlib/**
- deps/zstd/**
- doc/**
@@ -92,6 +93,7 @@ on:
- deps/uvwasi/**
- deps/v8/third_party/abseil-cpp/**
- deps/v8/third_party/highway/**
- deps/v8/third_party/simdutf/**
- deps/zlib/**
- deps/zstd/**
- doc/**
+1
View File
@@ -1326,6 +1326,7 @@ ifeq ($(SKIP_SHARED_DEPS), 1)
$(RM) -r $(TARNAME)/deps/uvwasi
$(RM) -r $(TARNAME)/deps/v8/third_party/abseil-cpp
$(RM) -r $(TARNAME)/deps/v8/third_party/highway
$(RM) -r $(TARNAME)/deps/v8/third_party/simdutf
$(RM) -r $(TARNAME)/deps/zlib
$(RM) -r $(TARNAME)/deps/zstd
else
+1 -2
View File
@@ -8,7 +8,6 @@
'type': 'static_library',
'include_dirs': [
'.',
'<(DEPTH)/deps/v8/third_party/simdutf',
],
'direct_dependent_settings': {
'include_dirs': ['.'],
@@ -17,7 +16,7 @@
'ADA_USE_SIMDUTF=1',
],
'dependencies': [
'../../tools/v8_gypfiles/v8.gyp:simdutf',
'../../tools/v8_gypfiles/simdutf.gyp:simdutf',
],
'sources': [ '<@(ada_sources)' ]
},
+1 -1
View File
@@ -1654,7 +1654,7 @@
'libraries': [ '-framework CoreFoundation -framework Security' ],
}],
[ 'node_shared_simdutf=="false" and node_use_bundled_v8!="false"', {
'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf#host' ],
'dependencies': [ 'tools/v8_gypfiles/simdutf.gyp:simdutf#host' ],
}],
[ 'node_shared_libuv=="false"', {
'dependencies': [ 'deps/uv/uv.gyp:libuv#host' ],
+1 -1
View File
@@ -247,7 +247,7 @@
}],
[ 'node_shared_simdutf=="false" and node_use_bundled_v8!="false"', {
'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf' ],
'dependencies': [ 'tools/v8_gypfiles/simdutf.gyp:simdutf' ],
}],
[ 'node_shared_brotli=="false"', {
+2
View File
@@ -68,6 +68,7 @@ let
++ pkgs.lib.optional (builtins.hasAttr "abseil" sharedLibDeps) sharedLibDeps.abseil
++ pkgs.lib.optional (builtins.hasAttr "highway" sharedLibDeps) sharedLibDeps.highway
++ pkgs.lib.optional (withPerfetto && useSharedPerfetto) sharedLibDeps.perfetto
++ pkgs.lib.optional (builtins.hasAttr "simdutf" sharedLibDeps) sharedLibDeps.simdutf
++ pkgs.lib.optional (withTemporal && useSharedTemporal) sharedLibDeps.temporal_capi;
# Put here only the configure flags that affect the V8 build
@@ -83,6 +84,7 @@ let
++ pkgs.lib.optional (builtins.hasAttr "abseil" sharedLibDeps) "--shared-abseil"
++ pkgs.lib.optional (builtins.hasAttr "highway" sharedLibDeps) "--shared-highway"
++ pkgs.lib.optional (withPerfetto && useSharedPerfetto) "--shared-perfetto"
++ pkgs.lib.optional (builtins.hasAttr "simdutf" sharedLibDeps) "--shared-simdutf"
++ pkgs.lib.optional (withTemporal && useSharedTemporal) "--shared-temporal_capi"
++ pkgs.lib.optional withPerfetto "--with-perfetto";
in
+4 -1
View File
@@ -17,7 +17,6 @@
merve
nbytes
simdjson
simdutf
uvwasi
zlib
zstd
@@ -34,6 +33,10 @@
hash = "sha256-PxhfWxw+d4heuc8/LE2ksan3OiS/WVe4KRg60Tf4Lcg=";
};
};
simdutf = pkgs.simdutf.overrideAttrs (old: {
# TODO: remove this once the pin we use has picked up https://github.com/NixOS/nixpkgs/pull/557405
cmakeFlags = old.cmakeFlags ++ [ (pkgs.lib.cmakeFeature "SIMDUTF_CXX_STANDARD" "20") ];
});
}
// (pkgs.lib.optionalAttrs withLief {
inherit (pkgs) lief;
+6 -1
View File
@@ -25,6 +25,7 @@
let
useSharedAbseil = builtins.elem "--shared-abseil" configureFlags;
useSharedHighway = builtins.elem "--shared-highway" configureFlags;
useSharedSimdutf = builtins.elem "--shared-simdutf" configureFlags;
src =
let
inherit (lib) fileset;
@@ -47,6 +48,7 @@ let
]
++ lib.optional (!useSharedAbseil) ../../tools/v8_gypfiles/abseil.gyp
++ lib.optional (!useSharedHighway) ../../tools/v8_gypfiles/highway.gyp
++ lib.optional (!useSharedSimdutf) ../../tools/v8_gypfiles/simdutf.gyp
++ lib.optional (
builtins.elem "--with-perfetto" configureFlags
&& !(builtins.elem "--shared-perfetto" configureFlags)
@@ -76,6 +78,7 @@ let
]
++ lib.optional useSharedAbseil ../../deps/v8/third_party/abseil-cpp
++ lib.optional useSharedHighway ../../deps/v8/third_party/highway
++ lib.optional useSharedSimdutf ../../deps/v8/third_party/simdutf
));
trackedFiles =
({
@@ -201,7 +204,9 @@ stdenv.mkDerivation (finalAttrs: {
''
}
install -Dm644 deps/v8/third_party/simdutf/simdutf.h -t $out/include
${lib.optionalString (
!useSharedSimdutf
) "install -Dm644 deps/v8/third_party/simdutf/simdutf.h -t $out/include"}
find deps/v8/include -name '*.h' -print0 | while read -r -d "" file; do
install -Dm644 "$file" -T "$out/include/''${file#deps/v8/include/}"
done
+22
View File
@@ -0,0 +1,22 @@
{
'includes': ['toolchain.gypi'],
'targets': [
{
'target_name': 'simdutf',
'type': 'static_library',
'toolsets': ['host', 'target'],
'variables': {
'SIMDUTF_ROOT': '../../deps/v8/third_party/simdutf',
},
'all_dependent_settings': {
'include_dirs': [
'<(SIMDUTF_ROOT)',
],
},
'include_dirs': ['.'],
'sources': [
'<(SIMDUTF_ROOT)/simdutf.cpp',
],
}, # simdutf
],
}
+4 -16
View File
@@ -650,7 +650,10 @@
}],
['node_shared_highway=="false"', {
'dependencies': ['highway.gyp:highway'],
}]
}],
['node_shared_simdutf=="false"', {
'dependencies': ['simdutf.gyp:simdutf'],
}],
],
'direct_dependent_settings': {
'sources': [
@@ -1118,7 +1121,6 @@
'v8_maybe_icu',
'v8_zlib',
'v8_pch',
'simdutf',
],
'includes': ['inspector.gypi'],
'direct_dependent_settings': {
@@ -2479,19 +2481,5 @@
],
},
}, # fp16
{
'target_name': 'simdutf',
'type': 'static_library',
'toolsets': ['host', 'target'],
'direct_dependent_settings': {
'include_dirs': [
'<(V8_ROOT)/third_party/simdutf',
],
},
'include_dirs': ['.'],
'sources': [
'<(V8_ROOT)/third_party/simdutf/simdutf.cpp',
],
}, # simdutf
],
}