Skip to content

Commit 0816a3e

Browse files
committed
Fixup GN buildfiles patch
nodejs/node#30755
1 parent 7da7ba2 commit 0816a3e

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

patches/node/build_add_gn_build_files.patch

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,29 +1697,24 @@ index 655802980a6ea94d1d4ca1dc63c8c8e905fbb83a..ab1a18a215cb7393310324c6dbcacc66
16971697
if 'false' == variables.get('node_shared_libuv'):
16981698
subdir_files('deps/uv/include', 'include/node/', action)
16991699
diff --git a/tools/js2c.py b/tools/js2c.py
1700-
index 1346b2a87046d3472577875c887b3b44a63280ed..752344d68c3f63b4c5e491b33d4576ed48f8b74f 100755
1700+
index 4594694a2cab0d878d86127a72714ed60c251b6e..9e9883129bed62c591d23f71d139514c5034ac8d 100755
17011701
--- a/tools/js2c.py
17021702
+++ b/tools/js2c.py
1703-
@@ -261,10 +261,18 @@ def NormalizeFileName(filename):
1704-
split = ['internal'] + split
1705-
else: # `lib/**/*.js` so drop the 'lib' part
1703+
@@ -130,6 +130,14 @@ def NormalizeFileName(filename):
17061704
split = split[1:]
1707-
+
17081705
if len(split):
17091706
filename = '/'.join(split)
1710-
- return os.path.splitext(filename)[0]
1711-
1707+
+
17121708
+ # Electron-specific: when driving the node build from Electron, we generate
17131709
+ # config.gypi in a separate directory and pass the absolute path to js2c.
17141710
+ # This overrides the absolute path so that the variable names in the
17151711
+ # generated C are as if it was in the root node directory.
17161712
+ if filename.endswith("/config.gypi"):
17171713
+ filename = "config.gypi"
17181714
+
1719-
+ return os.path.splitext(filename)[0]
1715+
return os.path.splitext(filename)[0]
1716+
17201717

1721-
def JS2C(source_files, target):
1722-
# Process input from all *macro.py files
17231718
diff --git a/tools/tar.py b/tools/tar.py
17241719
new file mode 100644
17251720
index 0000000000000000000000000000000000000000..eb697be25779db62c829aac45a509804e9fff331

0 commit comments

Comments
 (0)