Skip to content

Complete the getting-started documentation after the build-system upd… #1231

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 91 additions & 14 deletions docs/01.GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,51 +21,128 @@ To make our scripts run correctly, several shell utilities should be available o

- `find`
- `awk`
- `wget`

### Building Debug Version
### Building Jerryscript

To build debug version for Linux:
##### To build debug version for Linux:

```bash
python tools/build.py --debug
```

To build debug version for Linux without LTO (Link Time Optimization):
##### To build debug version for Linux without LTO (Link Time Optimization):

```bash
python tools/build.py --debug --lto=off
```

Add custom arguments to CMake:
##### Add custom arguments to CMake:

```bash
python tools/build.py --cmake-param CMAKE_PARAM
python tools/build.py --cmake-param=CMAKE_PARAM
```

Add toolchain file:
##### Set an ECMAScript profile mode (full|compact|minimal):

The cmake dir already contains some usable toolchain files.
```bash
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:

```bash
python tools/build.py --jerry-libc=off --compiler-default-libc=on
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if --jerry-libc=off and --compiler-default-libc=off? Wouldn't be better if disabling jerry libc would enable compiler libc automatically?

```

- external libc:

```bash
python tools/build.py --jerry-libc=off --compiler-default-libc=off --compile-flag="-I/path/to/libc/include"
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is also possible. Disregard my comment above.


##### Add toolchain file:

The ```cmake``` dir already contains some usable toolchain files, which you can use in the following format:

```bash
python tools/build.py --toolchain TOOLCHAIN
python tools/build.py --toolchain=TOOLCHAIN
```

Use (jerry|compiler-default|external libc) libc:
For example the cross-compile to RaspberryPi 2 is something like this:

```bash
python tools/build.py --libc LIBC
python tools/build.py --toolchain=cmake/toolchain_linux_armv7l-hf.cmake
```
The possible arguments are `jerry` , `compiler` , `<path of external lib>`

To get more available buildoptions for Linux:
##### To get a list of all the available buildoptions for Linux:

```bash
python tools/build.py --help
```

### Checking Patch
### Checking patch

```bash
python tools/run-tests.py --precommit
```


#### Running only one type of test:

##### To run build option tests:

```bash
python tools/run-tests.py --buildoption-test
```

##### To run unittests:

```bash
python tools/run-tests.py --unittests
```

##### To run jerry-tests:

```bash
python tools/run-tests.py --jerry-tests
```

##### To run jerry-test-suite:

```bash
python tools/run-tests.py --jerry-test-suite
```

##### To run signed-off check:

```bash
python tools/run-tests.py --check-signed-off
```

##### To run cppcheck:

```bash
python tools/run-tests.py --check-cppcheck
```

##### To run vera check:

```bash
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:

```bash
python tools/run-tests.py --help
```