Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4896653

Browse filesBrowse files
codebytereaduh95
authored andcommitted
build: generate_config_gypi.py generates valid JSON
PR-URL: #61791 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 24b8585 commit 4896653
Copy full SHA for 4896653

1 file changed

+3-2Lines changed: 3 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/generate_config_gypi.py‎

Copy file name to clipboardExpand all lines: tools/generate_config_gypi.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def translate_config(out_dir, config, v8_config):
5858
'llvm_version': 13,
5959
'napi_build_version': config['napi_build_version'],
6060
'node_builtin_shareable_builtins':
61-
eval(config['node_builtin_shareable_builtins']),
61+
json.loads(config['node_builtin_shareable_builtins']),
6262
'node_module_version': int(config['node_module_version']),
6363
'node_use_openssl': config['node_use_openssl'],
6464
'node_use_amaro': config['node_use_amaro'],
@@ -102,7 +102,8 @@ def main():
102102

103103
# Write output.
104104
with open(args.target, 'w') as f:
105-
f.write(repr(translate_config(args.out_dir, config, v8_config)))
105+
f.write(json.dumps(translate_config(args.out_dir, config, v8_config),
106+
sort_keys=True))
106107

107108
# Write depfile. Force regenerating config.gypi when GN configs change.
108109
if args.dep_file:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.