diff --git a/.gitignore b/.gitignore index dfa7cd9c..dcf0fe3f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ build/ out/ npm-debug.log node_modules/ +package-lock.json # Generated by scripts/configure.js config.gypi diff --git a/README.md b/README.md index ec14416b..de69abf9 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,18 @@ version is LLDB 3.9 and above. Visual Studio is required for MSBuild and headers when building llnode. Git is required to download the lldb headers. +- Android / Termux (Experimental) + - Install Termux (https://termux.com) + + - Install Termux Packages + - pkg install clang lldb lldb-dev make + - pkg install nodejs-lts nodejs-lts-dev + - To debug: + ``` + llnode -- /data/data/com.termux/files/usr/bin/node --abort_on_uncaught_exception script.js + (llnode) run + ``` + ### Install the Plugin #### Install llnode globally via npm diff --git a/binding.gyp b/binding.gyp index 51b74de7..cef8acc5 100644 --- a/binding.gyp +++ b/binding.gyp @@ -117,7 +117,7 @@ }], ] }], - [ "OS=='linux' or OS=='freebsd'", { + [ "OS=='linux' or OS=='freebsd' or OS=='android'", { "conditions": [ # If we could not locate the lib dir, then we will have to search # from the global search paths during linking and at runtime diff --git a/llnode.gypi b/llnode.gypi index c1cf05f5..a144bf66 100644 --- a/llnode.gypi +++ b/llnode.gypi @@ -79,6 +79,15 @@ }], ], }], + [ "OS in 'android'", { + "target_conditions": [ + ["_type=='static_library'", { + "standalone_static_library": 1, # disable thin archive which needs binutils >= 2.19 + }], + ], + 'libraries': ['-llldb'], + 'cflags_cc': ['-std=c++11',' -Wall','-O3',' -fPIC'] + }], ] }, } diff --git a/scripts/configure.js b/scripts/configure.js index 8547aede..9df6cee8 100644 --- a/scripts/configure.js +++ b/scripts/configure.js @@ -52,7 +52,7 @@ function configureInstallation(osName, buildDir) { if (installation.libDir) { config.variables['lldb_lib_dir%'] = installation.libDir; } - } else if (osName === 'Linux') { + } else if (osName === 'Linux' || osName === 'Android') { installation = require('./linux').getLldbInstallation(); if (installation.libDir) { config.variables['lldb_lib_dir%'] = installation.libDir;