Skip to content

Commit 48e6750

Browse files
joyeecheungCeres6
authored andcommitted
build: replace js2c.py with js2c.cc
PR-URL: nodejs#46997 Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 4f03a22 commit 48e6750

File tree

5 files changed

+11
-292
lines changed

5 files changed

+11
-292
lines changed

deps/simdutf/simdutf.gyp

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
'targets': [
88
{
99
'target_name': 'simdutf',
10+
'toolsets': ['host', 'target'],
1011
'type': 'static_library',
1112
'include_dirs': ['.'],
1213
'direct_dependent_settings': {

deps/uv/uv.gyp

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
'targets': [
156156
{
157157
'target_name': 'libuv',
158+
'toolsets': ['host', 'target'],
158159
'type': '<(uv_library)',
159160
'include_dirs': [
160161
'include',

node.gyp

+9-10
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'node_lib_target_name%': 'libnode',
2828
'node_intermediate_lib_type%': 'static_library',
2929
'node_builtin_modules_path%': '',
30-
# We list the deps/ files out instead of globbing them in js2c.py since we
30+
# We list the deps/ files out instead of globbing them in js2c.cc since we
3131
# only include a subset of all the files under these directories.
3232
# The lengths of their file names combined should not exceed the
3333
# Windows command length limit or there would be an error.
@@ -362,6 +362,7 @@
362362
'src/quic/transportparams.h',
363363
],
364364
'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
365+
'node_js2c_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_js2c<(EXECUTABLE_SUFFIX)',
365366
'conditions': [
366367
['GENERATOR == "ninja"', {
367368
'node_text_start_object_path': 'src/large_pages/node_text_start.node_text_start.o'
@@ -770,6 +771,7 @@
770771
'deps/uvwasi/uvwasi.gyp:uvwasi',
771772
'deps/simdutf/simdutf.gyp:simdutf',
772773
'deps/ada/ada.gyp:ada',
774+
'node_js2c#host',
773775
],
774776

775777
'sources': [
@@ -925,8 +927,7 @@
925927
'action_name': 'node_js2c',
926928
'process_outputs_as_sources': 1,
927929
'inputs': [
928-
# Put the code first so it's a dependency and can be used for invocation.
929-
'tools/js2c.py',
930+
'<(node_js2c_exec)',
930931
'<@(library_files)',
931932
'<@(deps_files)',
932933
'config.gypi'
@@ -935,12 +936,9 @@
935936
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
936937
],
937938
'action': [
938-
'<(python)',
939-
'tools/js2c.py',
940-
'--directory',
941-
'lib',
942-
'--target',
939+
'<(node_js2c_exec)',
943940
'<@(_outputs)',
941+
'lib',
944942
'config.gypi',
945943
'<@(deps_files)',
946944
],
@@ -1179,8 +1177,9 @@
11791177
{
11801178
'target_name': 'node_js2c',
11811179
'type': 'executable',
1180+
'toolsets': ['host'],
11821181
'dependencies': [
1183-
'deps/simdutf/simdutf.gyp:simdutf',
1182+
'deps/simdutf/simdutf.gyp:simdutf#host',
11841183
],
11851184
'include_dirs': [
11861185
'tools'
@@ -1191,7 +1190,7 @@
11911190
],
11921191
'conditions': [
11931192
[ 'node_shared_libuv=="false"', {
1194-
'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
1193+
'dependencies': [ 'deps/uv/uv.gyp:libuv#host' ],
11951194
}],
11961195
[ 'debug_node=="true"', {
11971196
'cflags!': [ '-O3' ],

test/tools/test_js2c.py

-14
This file was deleted.

tools/js2c.py

-268
This file was deleted.

0 commit comments

Comments
 (0)