From 64bb5537f013772a94edd5c8a6dc259c22da0add Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 11 Apr 2024 12:30:51 +0200 Subject: [PATCH] build: encode non-ASCII Latin1 characters as one byte in JS2C https://github.com/nodejs/node/pull/51605 --- patches/node/build_add_gn_build_files.patch | 16 ++++++++++------ ...eate_cppgc_heap_on_non-32_bit_platforms.patch | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index e577c5bb4e642..c8f1bb1482e85 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -11,10 +11,10 @@ really in 20/21. We have to wait until 22 is released to be able to build with upstream GN files. diff --git a/BUILD.gn b/BUILD.gn -index 1ed186b597eece7c34cb69c8e1e20870555a040d..541e7d2b8ee05677b64a3ea39c1422560fd5df75 100644 +index 1ed186b597eece7c34cb69c8e1e20870555a040d..7d201bb6b822f0401c3be2bc52d65bc71463748b 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -1,14 +1,404 @@ +@@ -1,14 +1,406 @@ -############################################################################## -# # -# DO NOT EDIT THIS FILE! # @@ -258,9 +258,11 @@ index 1ed186b597eece7c34cb69c8e1e20870555a040d..541e7d2b8ee05677b64a3ea39c142256 + defines = [] + sources = [ + "tools/js2c.cc", -+ "tools/executable_wrapper.h" ++ "tools/executable_wrapper.h", ++ "src/embedded_data.cc", ++ "src/embedded_data.h", + ] -+ include_dirs = [ "tools" ] ++ include_dirs = [ "tools", "src" ] + deps = [ + "deps/simdutf($electron_js2c_toolchain)", + "deps/uv($electron_js2c_toolchain)", @@ -1256,10 +1258,10 @@ index 0000000000000000000000000000000000000000..af9cbada10203b387fb9732b346583b1 +} diff --git a/filenames.json b/filenames.json new file mode 100644 -index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334fb05654f +index 0000000000000000000000000000000000000000..f4aa1a263bb5938cf3476796ddb7747879c5d3fa --- /dev/null +++ b/filenames.json -@@ -0,0 +1,733 @@ +@@ -0,0 +1,735 @@ +// This file is automatically generated by generate_gn_filenames_json.py +// DO NOT EDIT +{ @@ -1770,6 +1772,7 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334 + "src/connection_wrap.cc", + "src/dataqueue/queue.cc", + "src/debug_utils.cc", ++ "src/embedded_data.cc", + "src/encoding_binding.cc", + "src/env.cc", + "src/fs_event_wrap.cc", @@ -1887,6 +1890,7 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334 + "src/dataqueue/queue.h", + "src/debug_utils.h", + "src/debug_utils-inl.h", ++ "src/embedded_data.h", + "src/encoding_binding.h", + "src/env_properties.h", + "src/env.h", diff --git a/patches/node/build_only_create_cppgc_heap_on_non-32_bit_platforms.patch b/patches/node/build_only_create_cppgc_heap_on_non-32_bit_platforms.patch index 07f003c399062..f624996a4c814 100644 --- a/patches/node/build_only_create_cppgc_heap_on_non-32_bit_platforms.patch +++ b/patches/node/build_only_create_cppgc_heap_on_non-32_bit_platforms.patch @@ -18,7 +18,7 @@ See https://gist.github.com/codebytere/275ec8923253fd6559b3d36115f7b31b for more This should be fixed and re-enabled on all platforms. diff --git a/BUILD.gn b/BUILD.gn -index 541e7d2b8ee05677b64a3ea39c1422560fd5df75..8d63fea3304b36654992fe718ceeb3931ef86d39 100644 +index 7d201bb6b822f0401c3be2bc52d65bc71463748b..38f4b5afb9e667f0958008847224fa7a6cfe64a0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -181,6 +181,10 @@ config("node_internal_config") {