node-gyp
node-gyp copied to clipboard
How to compile static library target in simulator
I need to have the simdutf target compiled by my implementation to support the new instructions. That is, add my simulator path before the gcc/g++ command to compile this object.
{
'variables': {
'simdutf_sources': [
'simdutf.cpp',
]
},
'targets': [
{
'target_name': 'simdutf',
'toolsets': ['host', 'target'],
'type': 'static_library',
'include_dirs': ['.'],
'direct_dependent_settings': {
'include_dirs': ['.'],
},
'sources': [
'<@(simdutf_sources)',
],
},
]
}
If it is an action, I can use the following method to add the path of my simulator before '<(node_js2c_exec)', but for a static library target, I don't know how to modify it.
'actions': [
{
'action_name': 'node_js2c',
'process_outputs_as_sources': 1,
'inputs': [
'<(node_js2c_exec)',
'<@(library_files)',
'<@(deps_files)',
'config.gypi'
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
],
'action': [
'my_simulator_path',
'<(node_js2c_exec)',
'<@(_outputs)',
'lib',
'config.gypi',
'<@(deps_files)',
'<@(linked_module_files)',
],