Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile static library target in simulator #3035

Open
Ch3nYuY opened this issue May 21, 2024 · 0 comments
Open

How to compile static library target in simulator #3035

Ch3nYuY opened this issue May 21, 2024 · 0 comments

Comments

@Ch3nYuY
Copy link

Ch3nYuY commented May 21, 2024

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)',
     ],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant