Remove jerry-libc (#2332)

Rationale:
- There is no port under targets/ that would use it. All of them
  turn it off when building.
- That's no surprise, as jerry-libc supports no barebone MCUs but
  posix targets with syscalls only. Actually, that's Linux only,
  because macOS builds have turned off the use of jerry-libc a
  while ago.
- And there is no point in maintaining a highly restricted set of
  libc functions: as soon as someone wants to use JerryScript in a
  scenario that needs more functions than jerry-main, they have to
  choose a different libc (most problably the compiler's default
  one).

I think that we should not keep supporting an otherwise unused
library for the purposes of jerry-main on arm/x86/x64-linux  only.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2018-08-21 09:26:53 +02:00
committed by GitHub
parent 851f4f0b89
commit 7639e613a4
40 changed files with 21 additions and 2687 deletions
-1
View File
@@ -50,7 +50,6 @@ jerry:
-DCMAKE_C_COMPILER_WORKS=TRUE \
-DENABLE_LTO=OFF \
-DENABLE_ALL_IN_ONE=ON \
-DJERRY_LIBC=OFF \
-DJERRY_CMDLINE=OFF \
-DEXTERNAL_COMPILE_FLAGS="$(ESP_CFLAGS)" \
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP)
-1
View File
@@ -1,6 +1,5 @@
cmake/*
docs/*
jerry-libc/*
jerry-libm/*
jerry-main/*
jerry-port/default/default-date.c
+1 -1
View File
@@ -51,7 +51,7 @@ install: install-apt-get-deps install-noapt
# Build JerryScript.
script-build-jerryscript:
tools/build.py --clean --toolchain cmake/toolchain_mcu_stm32f4.cmake --profile=es2015-subset --jerry-cmdline OFF --jerry-libc OFF --lto OFF --jerry-libm ON --all-in-one ON --mem-heap 70 --compile-flag='--sysroot=../nuttx'
tools/build.py --clean --toolchain cmake/toolchain_mcu_stm32f4.cmake --profile=es2015-subset --jerry-cmdline OFF --lto OFF --jerry-libm ON --all-in-one ON --mem-heap 70 --compile-flag='--sysroot=../nuttx'
# Link in the NuttX JerryScript target directory under the NuttX apps tree.
script-add-jerryscript-app:
-1
View File
@@ -41,7 +41,6 @@ jerryscript/tools/build.py \
--clean \
--lto=OFF \
--jerry-cmdline=OFF \
--jerry-libc=OFF \
--jerry-libm=ON \
--all-in-one=ON \
--mem-heap=70 \
-4
View File
@@ -87,13 +87,9 @@ Please check if the `STAGING_DIR` is configured correctly and that the toolchain
```
$ ./tools/build.py --toolchain cmake/toolchain_openwrt_mips.cmake \
--jerry-libc OFF \
--lto OFF
```
Currenlty the JerryScript libc does not supports the mips platform, that's why the `--jerry-libc OFF` argument
is passed during build.
### 2. Copy the binary
After a successful build the `build/bin/jerry` binary file can be copied to the target device.
-1
View File
@@ -45,7 +45,6 @@ jerrycore:
-DCMAKE_C_COMPILER_WORKS=TRUE \
-DENABLE_LTO=ON \
-DENABLE_ALL_IN_ONE=OFF \
-DJERRY_LIBC=OFF \
-DJERRY_LIBM=OFF \
-DJERRY_CMDLINE=OFF \
-DFEATURE_PROFILE=minimal \
-1
View File
@@ -35,7 +35,6 @@ libjerry:
-DCMAKE_C_COMPILER_WORKS=TRUE \
-DENABLE_LTO=OFF \
-DENABLE_ALL_IN_ONE=OFF \
-DJERRY_LIBC=OFF \
-DJERRY_LIBM=OFF \
-DJERRY_CMDLINE=OFF \
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
@@ -25,7 +25,6 @@ libjerry:
cmake -B$(BUILD_DIR) -H./ \
-DENABLE_LTO=OFF \
-DENABLE_ALL_IN_ONE=OFF \
-DJERRY_LIBC=OFF \
-DJERRY_CMDLINE=OFF \
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP) \
+2 -3
View File
@@ -10,7 +10,7 @@ If you are in a hurry, run following commands:
```
$ sudo apt-add-repository -y "ppa:team-gcc-arm-embedded/ppa"
$ sudo apt-get update
$ sudo apt-get update
$ sudo apt-get install gcc-arm-embedded
$ git clone https://github.com/jerryscript-project/jerryscript.git jerryscript
$ cd jerryscript
@@ -87,7 +87,6 @@ jerryscript/tools/build.py \
--clean \
--lto=OFF \
--jerry-cmdline=OFF \
--jerry-libc=OFF \
--all-in-one=OFF \
--mem-heap=70 \
--profile=es2015-subset \
@@ -151,4 +150,4 @@ Without argument it prints:
TASH>>jerry
No input files, running a hello world demo:
Hello World from JerryScript
```
```
-1
View File
@@ -83,7 +83,6 @@ endif
-DCMAKE_C_COMPILER_WORKS=TRUE \
-DENABLE_LTO=OFF \
-DENABLE_ALL_IN_ONE=OFF \
-DJERRY_LIBC=OFF \
-DJERRY_CMDLINE=OFF \
-DFEATURE_PROFILE=$(JERRYPROFILE) \
-DFEATURE_ERROR_MESSAGES=ON \