| 28 | return bool_to_number(v == 'true') |
| 29 | |
| 30 | def get_gn_config(out_dir): |
| 31 | # Read args from GN configurations. |
| 32 | gn_args = subprocess.check_output( |
| 33 | [GN, 'args', '--list', '--short', '-C', out_dir]) |
| 34 | config = dict(re.findall(GN_RE, gn_args.decode())) |
| 35 | # Get napi_build_version from Node, which is not part of GN args. |
| 36 | config['napi_build_version'] = getnapibuildversion.get_napi_version() |
| 37 | return config |
| 38 | |
| 39 | def get_v8_config(out_dir, node_gn_path): |
| 40 | with open(os.path.join(out_dir, 'v8_features.json')) as f: |