Skip to content

Commit 30141f1

Browse files
authored
build: support building crates (temporal) on windows
1 parent 5e677d6 commit 30141f1

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

deps/crates/crates.gyp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
'variables': {
33
'cargo_vendor_dir': './vendor',
4+
'node_crates_libpath': '<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/<(STATIC_LIB_PREFIX)node_crates<(STATIC_LIB_SUFFIX)',
45
},
56
'targets': [
67
{
@@ -14,7 +15,7 @@
1415
],
1516
'link_settings': {
1617
'libraries': [
17-
'<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/libnode_crates.a',
18+
'<(node_crates_libpath)',
1819
],
1920
},
2021
'actions': [
@@ -24,7 +25,7 @@
2425
'<@(_sources)'
2526
],
2627
'outputs': [
27-
'<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/libnode_crates.a'
28+
'<(node_crates_libpath)'
2829
],
2930
'action': [
3031
'cargo',
@@ -49,6 +50,18 @@
4950
'<(cargo_vendor_dir)/temporal_capi/bindings/cpp',
5051
],
5152
},
53+
'conditions': [
54+
['OS=="win"', {
55+
'direct_dependent_settings': {
56+
'link_settings': {
57+
'libraries': [
58+
'-lntdll',
59+
'-luserenv'
60+
],
61+
},
62+
},
63+
}],
64+
],
5265
},
5366
]
5467
}

0 commit comments

Comments
 (0)