Skip to content

Commit

Permalink
build: replace js2c.py with js2c.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung committed Mar 7, 2023
1 parent 0e9134c commit d508fe4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 263 deletions.
1 change: 1 addition & 0 deletions deps/simdutf/simdutf.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,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 @@ -39,6 +39,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 All @@ -52,6 +52,7 @@
'<@(node_builtin_shareable_builtins)',
],
'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 @@ -460,6 +461,7 @@
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/simdutf/simdutf.gyp:simdutf',
'deps/ada/ada.gyp:ada',
'node_js2c#host',
],

'sources': [
Expand Down Expand Up @@ -891,8 +893,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 @@ -901,12 +902,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 @@ -1126,8 +1124,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 @@ -1138,7 +1137,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.

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

This file was deleted.

0 comments on commit d508fe4

Please sign in to comment.