(out_dir, config, v8_config)
| 45 | return v8_config |
| 46 | |
| 47 | def translate_config(out_dir, config, v8_config): |
| 48 | config_gypi = { |
| 49 | 'target_defaults': { |
| 50 | 'default_configuration': |
| 51 | 'Debug' if config['is_debug'] == 'true' else 'Release', |
| 52 | }, |
| 53 | 'variables': { |
| 54 | 'asan': bool_string_to_number(config['is_asan']), |
| 55 | 'clang': bool_to_number(config['is_clang']), |
| 56 | 'enable_lto': config['use_thin_lto'], |
| 57 | 'is_debug': bool_string_to_number(config['is_debug']), |
| 58 | 'llvm_version': 13, |
| 59 | 'napi_build_version': config['napi_build_version'], |
| 60 | 'node_builtin_shareable_builtins': |
| 61 | json.loads(config['node_builtin_shareable_builtins']), |
| 62 | 'node_module_version': int(config['node_module_version']), |
| 63 | 'node_use_openssl': config['node_use_openssl'], |
| 64 | 'node_use_amaro': config['node_use_amaro'], |
| 65 | 'node_use_node_code_cache': config['node_use_node_code_cache'], |
| 66 | 'node_use_node_snapshot': config['node_use_node_snapshot'], |
| 67 | 'v8_enable_inspector': # this is actually a node misnomer |
| 68 | bool_string_to_number(config['node_enable_inspector']), |
| 69 | 'shlib_suffix': 'dylib' if sys.platform == 'darwin' else 'so', |
| 70 | 'tsan': bool_string_to_number(config['is_tsan']), |
| 71 | # TODO(zcbenz): Shared components are not supported in GN config yet. |
| 72 | 'node_shared': 'false', |
| 73 | 'node_shared_brotli': 'false', |
| 74 | 'node_shared_cares': 'false', |
| 75 | 'node_shared_http_parser': 'false', |
| 76 | 'node_shared_libuv': 'false', |
| 77 | 'node_shared_nghttp2': 'false', |
| 78 | 'node_shared_nghttp3': 'false', |
| 79 | 'node_shared_ngtcp2': 'false', |
| 80 | 'node_shared_openssl': 'false', |
| 81 | 'node_shared_sqlite': 'false', |
| 82 | 'node_shared_zlib': 'false', |
| 83 | } |
| 84 | } |
| 85 | config_gypi['variables'].update(v8_config) |
| 86 | return config_gypi |
| 87 | |
| 88 | def main(): |
| 89 | parser = argparse.ArgumentParser( |
no test coverage detected
searching dependent graphs…