| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3cc8570 commit bec7fce
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1478,8 +1478,8 @@ def host_arch_win(): | |||
| 1478 | 1478 | return matchup.get(arch, 'x64') | |
| 1479 | 1479 | ||
| 1480 | 1480 | def set_configuration_variable(configs, name, release=None, debug=None): | |
| 1481 | - configs['Release'][name] = release | ||
| 1482 | - configs['Debug'][name] = debug | ||
| 1481 | + configs['Release']['variables'][name] = release | ||
| 1482 | + configs['Debug']['variables'][name] = debug | ||
| 1483 | 1483 | ||
| 1484 | 1484 | def configure_arm(o): | |
| 1485 | 1485 | if options.arm_float_abi: | |
@@ -1560,6 +1560,7 @@ def configure_node(o): | |||
| 1560 | 1560 | o['variables']['control_flow_guard'] = b(options.enable_cfg) | |
| 1561 | 1561 | o['variables']['node_use_amaro'] = b(not options.without_amaro) | |
| 1562 | 1562 | o['variables']['debug_node'] = b(options.debug_node) | |
| 1563 | + o['variables']['build_type%'] = 'Debug' if options.debug else 'Release' | ||
| 1563 | 1564 | o['default_configuration'] = 'Debug' if options.debug else 'Release' | |
| 1564 | 1565 | if options.error_on_warn and options.suppress_all_error_on_warn: | |
| 1565 | 1566 | raise Exception('--error_on_warn is incompatible with --suppress_all_error_on_warn.') | |
@@ -1810,6 +1811,11 @@ def configure_library(lib, output, pkgname=None): | |||
| 1810 | 1811 | output['libraries'] += pkg_libs.split() | |
| 1811 | 1812 | ||
| 1812 | 1813 | ||
| 1814 | + def configure_rust(o, configs): | ||
| 1815 | + set_configuration_variable(configs, 'cargo_build_mode', release='release', debug='debug') | ||
| 1816 | + set_configuration_variable(configs, 'cargo_build_flags', release=['--release'], debug=[]) | ||
| 1817 | + | ||
| 1818 | + | ||
| 1813 | 1819 | def configure_v8(o, configs): | |
| 1814 | 1820 | set_configuration_variable(configs, 'v8_enable_v8_checks', release=1, debug=0) | |
| 1815 | 1821 | ||
@@ -2364,6 +2370,7 @@ def make_bin_override(): | |||
| 2364 | 2370 | 'libraries': [], | |
| 2365 | 2371 | 'defines': [], | |
| 2366 | 2372 | 'cflags': [], | |
| 2373 | + 'conditions': [], | ||
| 2367 | 2374 | } | |
| 2368 | 2375 | configurations = { | |
| 2369 | 2376 | 'Release': { 'variables': {} }, | |
@@ -2405,6 +2412,7 @@ def make_bin_override(): | |||
| 2405 | 2412 | configure_static(output) | |
| 2406 | 2413 | configure_inspector(output) | |
| 2407 | 2414 | configure_section_file(output) | |
| 2415 | + configure_rust(output, configurations) | ||
| 2408 | 2416 | ||
| 2409 | 2417 | # remove builtins that have been disabled | |
| 2410 | 2418 | if options.without_amaro: | |
@@ -2427,6 +2435,17 @@ def make_bin_override(): | |||
| 2427 | 2435 | variables = output['variables'] | |
| 2428 | 2436 | del output['variables'] | |
| 2429 | 2437 | ||
| 2438 | + # move configurations[*]['variables'] to conditions variables | ||
| 2439 | + config_release_vars = configurations['Release']['variables'] | ||
| 2440 | + del configurations['Release']['variables'] | ||
| 2441 | + config_debug_vars = configurations['Debug']['variables'] | ||
| 2442 | + del configurations['Debug']['variables'] | ||
| 2443 | + output['conditions'].append(['build_type=="Release"', { | ||
| 2444 | + 'variables': config_release_vars, | ||
| 2445 | + }, { | ||
| 2446 | + 'variables': config_debug_vars, | ||
| 2447 | + }]) | ||
| 2448 | + | ||
| 2430 | 2449 | # make_global_settings should be a root level element too | |
| 2431 | 2450 | if 'make_global_settings' in output: | |
| 2432 | 2451 | make_global_settings = output['make_global_settings'] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,57 @@ | |||
| 1 | + { | ||
| 2 | + 'targets': [ | ||
| 3 | + { | ||
| 4 | + 'target_name': 'temporal_capi', | ||
| 5 | + 'type': 'none', | ||
| 6 | + 'hard_dependency': 1, | ||
| 7 | + 'sources': [ | ||
| 8 | + 'src/calendar.rs', | ||
| 9 | + 'src/error.rs', | ||
| 10 | + 'src/lib.rs', | ||
| 11 | + 'src/plain_date_time.rs', | ||
| 12 | + 'src/plain_month_day.rs', | ||
| 13 | + 'src/plain_year_month.rs', | ||
| 14 | + 'src/time_zone.rs', | ||
| 15 | + 'src/duration.rs', | ||
| 16 | + 'src/instant.rs', | ||
| 17 | + 'src/options.rs', | ||
| 18 | + 'src/plain_date.rs', | ||
| 19 | + 'src/plain_time.rs', | ||
| 20 | + 'src/provider.rs', | ||
| 21 | + 'src/zoned_date_time.rs', | ||
| 22 | + ], | ||
| 23 | + 'direct_dependent_settings': { | ||
| 24 | + 'include_dirs': [ | ||
| 25 | + 'bindings/cpp', | ||
| 26 | + ], | ||
| 27 | + }, | ||
| 28 | + 'link_settings': { | ||
| 29 | + 'libraries': [ | ||
| 30 | + '<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/libtemporal_capi.a', | ||
| 31 | + ], | ||
| 32 | + }, | ||
| 33 | + 'actions': [ | ||
| 34 | + { | ||
| 35 | + 'action_name': 'cargo_build', | ||
| 36 | + 'inputs': [ | ||
| 37 | + '<@(_sources)', | ||
| 38 | + ], | ||
| 39 | + 'outputs': [ | ||
| 40 | + '<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/libtemporal_capi.a' | ||
| 41 | + ], | ||
| 42 | + 'action': [ | ||
| 43 | + 'cargo', | ||
| 44 | + 'rustc', | ||
| 45 | + '>@(cargo_build_flags)', | ||
| 46 | + '--crate-type', | ||
| 47 | + 'staticlib', | ||
| 48 | + '--features', | ||
| 49 | + 'zoneinfo64', | ||
| 50 | + '--target-dir', | ||
| 51 | + '<(SHARED_INTERMEDIATE_DIR)' | ||
| 52 | + ], | ||
| 53 | + } | ||
| 54 | + ], | ||
| 55 | + } | ||
| 56 | + ] | ||
| 57 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,6 +22,7 @@ | |||
| 22 | 22 | 'node_shared_cares%': 'false', | |
| 23 | 23 | 'node_shared_libuv%': 'false', | |
| 24 | 24 | 'node_shared_sqlite%': 'false', | |
| 25 | + 'node_shared_temporal_capi%': 'false', | ||
| 25 | 26 | 'node_shared_uvwasi%': 'false', | |
| 26 | 27 | 'node_shared_nghttp2%': 'false', | |
| 27 | 28 | 'node_use_openssl%': 'true', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -319,6 +319,11 @@ | |||
| 319 | 319 | '<(icu_gyp_path):icuuc', | |
| 320 | 320 | ], | |
| 321 | 321 | }], | |
| 322 | + ['v8_enable_temporal_support==1 and node_shared_temporal_capi=="false"', { | ||
| 323 | + 'dependencies': [ | ||
| 324 | + '../../deps/temporal/temporal_capi/temporal_capi.gyp:temporal_capi', | ||
| 325 | + ], | ||
| 326 | + }], | ||
| 322 | 327 | ], | |
| 323 | 328 | }, # v8_initializers_slow | |
| 324 | 329 | { | |
@@ -356,6 +361,11 @@ | |||
| 356 | 361 | '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_initializers.*?v8_enable_webassembly.*?sources \\+= ")', | |
| 357 | 362 | ], | |
| 358 | 363 | }], | |
| 364 | + ['v8_enable_temporal_support==1 and node_shared_temporal_capi=="false"', { | ||
| 365 | + 'dependencies': [ | ||
| 366 | + '../../deps/temporal/temporal_capi/temporal_capi.gyp:temporal_capi', | ||
| 367 | + ], | ||
| 368 | + }], | ||
| 359 | 369 | ['v8_target_arch=="ia32"', { | |
| 360 | 370 | 'sources': [ | |
| 361 | 371 | '<(V8_ROOT)/src/builtins/ia32/builtins-ia32.cc', | |
@@ -1128,6 +1138,13 @@ | |||
| 1128 | 1138 | ], | |
| 1129 | 1139 | }], | |
| 1130 | 1140 | ['v8_enable_temporal_support==1', { | |
| 1141 | + 'conditions': [ | ||
| 1142 | + ['node_shared_temporal_capi=="false"', { | ||
| 1143 | + 'dependencies': [ | ||
| 1144 | + '../../deps/temporal/temporal_capi/temporal_capi.gyp:temporal_capi', | ||
| 1145 | + ], | ||
| 1146 | + }], | ||
| 1147 | + ], | ||
| 1131 | 1148 | 'sources': [ | |
| 1132 | 1149 | '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_temporal_support.*?sources \\+= ")', | |
| 1133 | 1150 | ], | |
| Back | FazBrowse Home | New Git URL |
0 commit comments