abbr / deasync

Turns async function into sync via JavaScript wrapper of Node event loop
MIT License
971 stars 73 forks source link

please add archtecture loongarch64 support #148

Closed amazingfate closed 3 years ago

amazingfate commented 3 years ago

here is the output of node ./build.js:

gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@14.16.1 | linux | loongarch64
gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/share/nodejs/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/loongson/electron/zs-im-ts-test/node_modules/deasync/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/share/nodejs/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/include/nodejs/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args   '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/loongson/electron/zs-im-ts-test/node_modules/deasync',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: 进入目录“/home/loongson/electron/zs-im-ts-test/node_modules/deasync/build”
  CXX(target) Release/obj.target/deasync/src/deasync.o
  SOLINK_MODULE(target) Release/obj.target/deasync.node
  COPY Release/deasync.node
make: 离开目录“/home/loongson/electron/zs-im-ts-test/node_modules/deasync/build”
gyp info ok
Installed in `/home/loongson/electron/zs-im-ts-test/node_modules/deasync/bin/linux-loongarch64-node-14/deasync.node`
abbr commented 3 years ago

If by support you mean provide pre-compiled binaries, since Nodejs itself doesn't support the arch, I expect you have the toolset to compile C++ source code.

amazingfate commented 3 years ago

@abbr your code can not be compiled successfully, I have to modify build.js, just as other people add support for mips64el.

abbr commented 3 years ago

Ah... pr merged and v0.1.23 published.