Skip to content

Commit

Permalink
build: encode non-ASCII Latin1 characters as one byte in JS2C
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Apr 11, 2024
1 parent b03300d commit 64bb553
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions patches/node/build_add_gn_build_files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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! #
Expand Down Expand Up @@ -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)",
Expand Down Expand Up @@ -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
+{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 64bb553

Please sign in to comment.