Skip to content

Commit d382b16

Browse files
committed
build: replace js2c.py with js2c.cc
1 parent 370580e commit d382b16

File tree

5 files changed

+11
-263
lines changed

5 files changed

+11
-263
lines changed

deps/simdutf/simdutf.gyp

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
'targets': [
33
{
44
'target_name': 'simdutf',
5+
'toolsets': ['host', 'target'],
56
'type': 'static_library',
67
'include_dirs': ['.'],
78
'direct_dependent_settings': {

deps/uv/uv.gyp

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'targets': [
4040
{
4141
'target_name': 'libuv',
42+
'toolsets': ['host', 'target'],
4243
'type': '<(uv_library)',
4344
'include_dirs': [
4445
'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.
@@ -52,6 +52,7 @@
5252
'<@(node_builtin_shareable_builtins)',
5353
],
5454
'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
55+
'node_js2c_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_js2c<(EXECUTABLE_SUFFIX)',
5556
'conditions': [
5657
['GENERATOR == "ninja"', {
5758
'node_text_start_object_path': 'src/large_pages/node_text_start.node_text_start.o'
@@ -460,6 +461,7 @@
460461
'deps/uvwasi/uvwasi.gyp:uvwasi',
461462
'deps/simdutf/simdutf.gyp:simdutf',
462463
'deps/ada/ada.gyp:ada',
464+
'node_js2c#host',
463465
],
464466

465467
'sources': [
@@ -891,8 +893,7 @@
891893
'action_name': 'node_js2c',
892894
'process_outputs_as_sources': 1,
893895
'inputs': [
894-
# Put the code first so it's a dependency and can be used for invocation.
895-
'tools/js2c.py',
896+
'<(node_js2c_exec)',
896897
'<@(library_files)',
897898
'<@(deps_files)',
898899
'config.gypi'
@@ -901,12 +902,9 @@
901902
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
902903
],
903904
'action': [
904-
'<(python)',
905-
'tools/js2c.py',
906-
'--directory',
907-
'lib',
908-
'--target',
905+
'<(node_js2c_exec)',
909906
'<@(_outputs)',
907+
'lib',
910908
'config.gypi',
911909
'<@(deps_files)',
912910
],
@@ -1126,8 +1124,9 @@
11261124
{
11271125
'target_name': 'node_js2c',
11281126
'type': 'executable',
1127+
'toolsets': ['host'],
11291128
'dependencies': [
1130-
'deps/simdutf/simdutf.gyp:simdutf',
1129+
'deps/simdutf/simdutf.gyp:simdutf#host',
11311130
],
11321131
'include_dirs': [
11331132
'tools'
@@ -1138,7 +1137,7 @@
11381137
],
11391138
'conditions': [
11401139
[ 'node_shared_libuv=="false"', {
1141-
'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
1140+
'dependencies': [ 'deps/uv/uv.gyp:libuv#host' ],
11421141
}],
11431142
[ 'debug_node=="true"', {
11441143
'cflags!': [ '-O3' ],

test/tools/test_js2c.py

-14
This file was deleted.

tools/js2c.py

-239
This file was deleted.

0 commit comments

Comments
 (0)