From 64c647e3421e7756d68b4b12ee45e64d101b2956 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 16 Nov 2024 19:17:17 +0100 Subject: [PATCH] build: compile bundled simdutf conditionally The --shared-simdutf flag was introduced in #52924, but the implementation was incomplete. Resolves #52914 PR-URL: https://github.com/nodejs/node/pull/55886 Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau --- node.gyp | 9 +++------ node.gypi | 4 ++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/node.gyp b/node.gyp index 502083d3300..b8bfebb562f 100644 --- a/node.gyp +++ b/node.gyp @@ -849,7 +849,6 @@ 'dependencies': [ 'deps/googletest/googletest.gyp:gtest_prod', 'deps/histogram/histogram.gyp:histogram', - 'deps/simdutf/simdutf.gyp:simdutf', 'deps/nbytes/nbytes.gyp:nbytes', 'node_js2c#host', ], @@ -1170,7 +1169,6 @@ 'deps/googletest/googletest.gyp:gtest', 'deps/googletest/googletest.gyp:gtest_main', 'deps/histogram/histogram.gyp:histogram', - 'deps/simdutf/simdutf.gyp:simdutf', 'deps/nbytes/nbytes.gyp:nbytes', ], @@ -1322,9 +1320,6 @@ 'target_name': 'node_js2c', 'type': 'executable', 'toolsets': ['host'], - 'dependencies': [ - 'deps/simdutf/simdutf.gyp:simdutf#host', - ], 'include_dirs': [ 'tools', 'src', @@ -1336,6 +1331,9 @@ 'src/embedded_data.cc', ], 'conditions': [ + [ 'node_shared_simdutf=="false"', { + 'dependencies': [ 'deps/simdutf/simdutf.gyp:simdutf#host' ], + }], [ 'node_shared_libuv=="false"', { 'dependencies': [ 'deps/uv/uv.gyp:libuv#host' ], }], @@ -1362,7 +1360,6 @@ '<(node_lib_target_name)', 'deps/histogram/histogram.gyp:histogram', 'deps/nbytes/nbytes.gyp:nbytes', - 'deps/simdutf/simdutf.gyp:simdutf', ], 'includes': [ diff --git a/node.gypi b/node.gypi index 63710d07f55..c61e9b170a0 100644 --- a/node.gypi +++ b/node.gypi @@ -220,6 +220,10 @@ 'dependencies': [ 'deps/simdjson/simdjson.gyp:simdjson' ], }], + [ 'node_shared_simdutf=="false"', { + 'dependencies': [ 'deps/simdutf/simdutf.gyp:simdutf' ], + }], + [ 'node_shared_brotli=="false"', { 'dependencies': [ 'deps/brotli/brotli.gyp:brotli' ], }],