Skip to content

Commit ce444fa

Browse files
authored
build: support building crates (temporal) on windows
PR-URL: #61163 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent 3518af0 commit ce444fa

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

deps/crates/crates.gyp

Lines changed: 11 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,15 @@
1415
],
1516
'link_settings': {
1617
'libraries': [
17-
'<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/libnode_crates.a',
18+
'<(node_crates_libpath)',
19+
],
20+
'conditions': [
21+
['OS=="win"', {
22+
'libraries': [
23+
'-lntdll',
24+
'-luserenv'
25+
],
26+
}],
1827
],
1928
},
2029
'actions': [
@@ -24,7 +33,7 @@
2433
'<@(_sources)'
2534
],
2635
'outputs': [
27-
'<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/libnode_crates.a'
36+
'<(node_crates_libpath)'
2837
],
2938
'action': [
3039
'cargo',

0 commit comments

Comments
 (0)