|
1 | 1 | # @node-versions: v24.10.0+ |
2 | | -# @description: Enable socket_brotli2c build tool for Brotli compression |
3 | | -# @requires: tools/socket_brotli2c.cc |
| 2 | +# @description: Enable socketsecurity_brotli2c build tool for Brotli compression |
| 3 | +# @requires: tools/socketsecurity_brotli2c.cc |
4 | 4 | # |
5 | | -# Adds the socket_brotli2c build target to node.gyp, which compiles the |
6 | | -# Socket Brotli compression tool used to convert Brotli-compressed data |
| 5 | +# Adds the socketsecurity_brotli2c build target to node.gyp, which compiles the |
| 6 | +# Socket Security Brotli compression tool used to convert Brotli-compressed data |
7 | 7 | # into C++ byte arrays for embedding in the Node.js binary. |
8 | 8 | # |
9 | | -# This patch also modifies the node_js2c action to use socket_brotli2c |
| 9 | +# This patch also modifies the node_js2c action to use socketsecurity_brotli2c |
10 | 10 | # instead of the standard js2c tool, ensuring Brotli-compressed binary |
11 | 11 | # data is output as byte arrays rather than string literals. |
12 | 12 | # |
13 | 13 | # This enables Brotli compression of JavaScript built-in modules for |
14 | 14 | # approximately 3.36 MB binary size reduction. |
15 | 15 | # |
16 | | -# CRITICAL: socket_brotli2c does NOT define NODE_JS2C_USE_STRING_LITERALS because |
| 16 | +# CRITICAL: socketsecurity_brotli2c does NOT define NODE_JS2C_USE_STRING_LITERALS because |
17 | 17 | # Brotli-compressed binary data must be output as byte arrays, not string literals. |
18 | 18 | # |
19 | 19 | # PATCH CREATION PROCESS: |
20 | 20 | # This patch was created using standard unified diff format (not git format). |
21 | 21 | # Steps: |
22 | 22 | # 1. Clone Node.js v24.10.0 |
23 | 23 | # 2. Modify node.gyp to: |
24 | | -# - Add socket_brotli2c target |
25 | | -# - Add socket_brotli2c_exec variable |
26 | | -# - Modify node_js2c action to use socket_brotli2c_exec |
| 24 | +# - Add socketsecurity_brotli2c target |
| 25 | +# - Add socketsecurity_brotli2c_exec variable |
| 26 | +# - Modify node_js2c action to use socketsecurity_brotli2c_exec |
27 | 27 | # 3. Generate patch with: diff -u original.gyp modified.gyp |
28 | 28 | # 4. Validate with: patch -p1 --dry-run < patch-file |
29 | 29 | # |
|
33 | 33 | ], |
34 | 34 | 'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)', |
35 | 35 | 'node_js2c_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_js2c<(EXECUTABLE_SUFFIX)', |
36 | | -+ 'socket_brotli2c_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)socket_brotli2c<(EXECUTABLE_SUFFIX)', |
| 36 | ++ 'socketsecurity_brotli2c_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)socketsecurity_brotli2c<(EXECUTABLE_SUFFIX)', |
37 | 37 | 'conditions': [ |
38 | 38 | ['GENERATOR == "ninja"', { |
39 | 39 | 'node_text_start_object_path': 'src/large_pages/node_text_start.node_text_start.o' |
|
42 | 42 | 'process_outputs_as_sources': 1, |
43 | 43 | 'inputs': [ |
44 | 44 | - '<(node_js2c_exec)', |
45 | | -+ '<(socket_brotli2c_exec)', |
| 45 | ++ '<(socketsecurity_brotli2c_exec)', |
46 | 46 | '<@(library_files)', |
47 | 47 | '<@(deps_files)', |
48 | 48 | 'config.gypi' |
|
51 | 51 | ], |
52 | 52 | 'action': [ |
53 | 53 | - '<(node_js2c_exec)', |
54 | | -+ '<(socket_brotli2c_exec)', |
| 54 | ++ '<(socketsecurity_brotli2c_exec)', |
55 | 55 | '<@(_outputs)', |
56 | 56 | 'lib', |
57 | 57 | 'config.gypi', |
|
60 | 60 | ] |
61 | 61 | }, |
62 | 62 | + { |
63 | | -+ 'target_name': 'socket_brotli2c', |
| 63 | ++ 'target_name': 'socketsecurity_brotli2c', |
64 | 64 | + 'type': 'executable', |
65 | 65 | + 'toolsets': ['host'], |
66 | 66 | + 'defines!': ['NODE_JS2C_USE_STRING_LITERALS'], |
|
69 | 69 | + 'src', |
70 | 70 | + ], |
71 | 71 | + 'sources': [ |
72 | | -+ 'tools/socket_brotli2c.cc', |
| 72 | ++ 'tools/socketsecurity_brotli2c.cc', |
73 | 73 | + 'tools/executable_wrapper.h', |
74 | 74 | + 'src/embedded_data.h', |
75 | 75 | + 'src/embedded_data.cc', |
|
0 commit comments