mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
2.8 KiB
2.8 KiB
Setting Up Prerequisites
Currently, only Ubuntu 14.04+ is officially supported as primary development environment.
There are several dependencies, that should be installed manually. The following list is required for building:
gccor any C99-compliant compiler- native
- arm-none-eabi
cmake>=2.8.12.2bash>=4.3.11cppcheck>=1.61vera++>=1.2.1python>=2.7.6
sudo apt-get install gcc g++ gcc-arm-none-eabi cmake cppcheck vera++ python
To make our scripts run correctly, several shell utilities should be available on the system:
findawk
Building Jerryscript
To build debug version for Linux:
python tools/build.py --debug
To build debug version for Linux without LTO (Link Time Optimization):
python tools/build.py --debug --lto=off
Add custom arguments to CMake:
python tools/build.py --cmake-param=CMAKE_PARAM
Set an ECMAScript profile mode (full|compact|minimal):
python tools/build.py --feature=full|compact|minimal
Use (jerry|compiler-default|external libc) libc:
The default libc is jerry-libc, but you can use compiler-default libc or an external libc:
- compiler-default libc:
python tools/build.py --jerry-libc=off --compiler-default-libc=on
- external libc:
python tools/build.py --jerry-libc=off --compiler-default-libc=off --compile-flag="-I/path/to/libc/include"
Add toolchain file:
The cmake dir already contains some usable toolchain files, which you can use in the following format:
python tools/build.py --toolchain=TOOLCHAIN
For example the cross-compile to RaspberryPi 2 is something like this:
python tools/build.py --toolchain=cmake/toolchain_linux_armv7l-hf.cmake
To get a list of all the available buildoptions for Linux:
python tools/build.py --help
Checking patch
python tools/run-tests.py --precommit
Running only one type of test:
To run build option tests:
python tools/run-tests.py --buildoption-test
To run unittests:
python tools/run-tests.py --unittests
To run jerry-tests:
python tools/run-tests.py --jerry-tests
To run jerry-test-suite:
python tools/run-tests.py --jerry-test-suite
To run signed-off check:
python tools/run-tests.py --check-signed-off
To run cppcheck:
python tools/run-tests.py --check-cppcheck
To run vera check:
python tools/run-tests.py --check-vera
Use toolchain file:
The cmake dir already contains some usable toolchain files, which you can use in the following format:
python tools/run-tests.py --toolchain=TOOLCHAIN
To get a list of all the available test options:
python tools/run-tests.py --help