-
Notifications
You must be signed in to change notification settings - Fork 38
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
add cmake compilation scripts for quickjs #56
Conversation
new file mode 100644 | ||
index 0000000..0dc6fd5 | ||
--- /dev/null | ||
+++ b/CMakeLists.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why need patch quickjs self?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for building the qjsc tool of target x86_64. If CONFIG_INTERPRETERS_QUICKJS_FULL is enabled, the qjsc tool is needed to compile js to bytecode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but we don't use CMakeList.txt from qjs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This CMakeList.txt will be saved in directory interpreters/quickjs/quickjs, and will be used to execute cross-compilation of qjsc at
nuttx-apps/interpreters/quickjs/CMakeLists.txt
Lines 148 to 155 in 63ba591
ExternalProject_Add( | |
qjsc | |
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/quickjs | |
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/ | |
CMAKE_ARGS -DCONFIG_BIGNUM=${CONFIG_INTERPRETERS_QUICKJS_BIGNUM} | |
-DQUICKJS_VERSION=${QUICKJS_VERSION} -DAPPDIR=${NUTTX_APPS_DIR} | |
TEST_COMMAND "" | |
INSTALL_COMMAND "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
add cmake compilation scripts for quickjs
Related:open-vela/nuttx#142
Impact
nop
Testing
$ git clone https://github.com/apache/nuttx
$ git clone https://github.com/apache/apps
$ cd nuttx
$ cmake -B build -DBOARD_CONFIG=sim:quickjs
$ cmake --build build
$ ./build/nuttx
NuttShell (NSH)
nsh> qjs
QuickJS - Type "\h" for help
qjs > console.log("Hello World")
Hello World