Skip to content

Commit

Permalink
build: replace js2c.py with js2c.cc
Browse files Browse the repository at this point in the history
PR-URL: #46997
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
  • Loading branch information
joyeecheung authored and targos committed May 30, 2023
1 parent 5325be1 commit 5d92202
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 292 deletions.
1 change: 1 addition & 0 deletions deps/simdutf/simdutf.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'targets': [
{
'target_name': 'simdutf',
'toolsets': ['host', 'target'],
'type': 'static_library',
'include_dirs': ['.'],
'direct_dependent_settings': {
Expand Down
1 change: 1 addition & 0 deletions deps/uv/uv.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
'targets': [
{
'target_name': 'libuv',
'toolsets': ['host', 'target'],
'type': '<(uv_library)',
'include_dirs': [
'include',
Expand Down
19 changes: 9 additions & 10 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'node_lib_target_name%': 'libnode',
'node_intermediate_lib_type%': 'static_library',
'node_builtin_modules_path%': '',
# We list the deps/ files out instead of globbing them in js2c.py since we
# We list the deps/ files out instead of globbing them in js2c.cc since we
# only include a subset of all the files under these directories.
# The lengths of their file names combined should not exceed the
# Windows command length limit or there would be an error.
Expand Down Expand Up @@ -362,6 +362,7 @@
'src/quic/transportparams.h',
],
'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
'node_js2c_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_js2c<(EXECUTABLE_SUFFIX)',
'conditions': [
['GENERATOR == "ninja"', {
'node_text_start_object_path': 'src/large_pages/node_text_start.node_text_start.o'
Expand Down Expand Up @@ -770,6 +771,7 @@
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/simdutf/simdutf.gyp:simdutf',
'deps/ada/ada.gyp:ada',
'node_js2c#host',
],

'sources': [
Expand Down Expand Up @@ -925,8 +927,7 @@
'action_name': 'node_js2c',
'process_outputs_as_sources': 1,
'inputs': [
# Put the code first so it's a dependency and can be used for invocation.
'tools/js2c.py',
'<(node_js2c_exec)',
'<@(library_files)',
'<@(deps_files)',
'config.gypi'
Expand All @@ -935,12 +936,9 @@
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
],
'action': [
'<(python)',
'tools/js2c.py',
'--directory',
'lib',
'--target',
'<(node_js2c_exec)',
'<@(_outputs)',
'lib',
'config.gypi',
'<@(deps_files)',
],
Expand Down Expand Up @@ -1179,8 +1177,9 @@
{
'target_name': 'node_js2c',
'type': 'executable',
'toolsets': ['host'],
'dependencies': [
'deps/simdutf/simdutf.gyp:simdutf',
'deps/simdutf/simdutf.gyp:simdutf#host',
],
'include_dirs': [
'tools'
Expand All @@ -1191,7 +1190,7 @@
],
'conditions': [
[ 'node_shared_libuv=="false"', {
'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
'dependencies': [ 'deps/uv/uv.gyp:libuv#host' ],
}],
[ 'debug_node=="true"', {
'cflags!': [ '-O3' ],
Expand Down
14 changes: 0 additions & 14 deletions test/tools/test_js2c.py

This file was deleted.

268 changes: 0 additions & 268 deletions tools/js2c.py

This file was deleted.

0 comments on commit 5d92202

Please sign in to comment.