Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,6 +1855,10 @@ def configure_node(o):
if flavor == 'win':
o['variables']['cargo_rust_target'] = \
'aarch64-pc-windows-msvc' if target_arch == 'arm64' else 'x86_64-pc-windows-msvc'
# Always set the Rust target for x64 macOS in case we will be building
# under Rosetta 2.
if flavor == 'mac' and target_arch == 'x64':
o['variables']['cargo_rust_target'] = 'x86_64-apple-darwin'

# Allow overriding the compiler - needed by embedders.
if options.use_clang:
Expand Down
13 changes: 9 additions & 4 deletions deps/crates/crates.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
},
'conditions': [
['cargo_rust_target!=""', {
'variables': {
'cargo_build_flags': ['--target', '<(cargo_rust_target)'],
}
}],
['OS=="win"', {
'variables': {
'node_crates_libpath': '<(SHARED_INTERMEDIATE_DIR)/$(Platform)/release/node_crates.lib',
},
}, {
'variables': {
'node_crates_libpath': '<(SHARED_INTERMEDIATE_DIR)/release/<(STATIC_LIB_PREFIX)node_crates<(STATIC_LIB_SUFFIX)',
'node_crates_libpath': '<(SHARED_INTERMEDIATE_DIR)/<(cargo_rust_target)/release/<(STATIC_LIB_PREFIX)node_crates<(STATIC_LIB_SUFFIX)',
},
}],
],
Expand All @@ -25,13 +30,13 @@
'cargo_build_flags': [],
},
'conditions': [
['cargo_rust_target!=""', {
['OS=="win"', {
'variables': {
'node_crates_libpath': '<(SHARED_INTERMEDIATE_DIR)/$(Platform)/debug/node_crates.lib',
},
}, {
'variables': {
'node_crates_libpath': '<(SHARED_INTERMEDIATE_DIR)/debug/<(STATIC_LIB_PREFIX)node_crates<(STATIC_LIB_SUFFIX)',
'node_crates_libpath': '<(SHARED_INTERMEDIATE_DIR)/<(cargo_rust_target)/debug/<(STATIC_LIB_PREFIX)node_crates<(STATIC_LIB_SUFFIX)',
},
}],
],
Expand Down Expand Up @@ -62,7 +67,7 @@
],
},
'conditions': [
['cargo_rust_target!=""', {
['OS=="win"', {
'actions': [
{
'action_name': 'cargo_build',
Expand Down
Loading