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:
@@ -92,8 +92,6 @@ def get_arguments():
|
||||
help=devhelp('build test version of the jerry command line tool (%(choices)s)'))
|
||||
compgrp.add_argument('--jerry-ext', metavar='X', choices=['ON', 'OFF'], type=str.upper,
|
||||
help='build jerry-ext (%(choices)s)')
|
||||
compgrp.add_argument('--jerry-libc', metavar='X', choices=['ON', 'OFF'], type=str.upper,
|
||||
help='build and use jerry-libc (%(choices)s)')
|
||||
compgrp.add_argument('--jerry-libm', metavar='X', choices=['ON', 'OFF'], type=str.upper,
|
||||
help='build and use jerry-libm (%(choices)s)')
|
||||
compgrp.add_argument('--jerry-port-default', metavar='X', choices=['ON', 'OFF'], type=str.upper,
|
||||
@@ -178,7 +176,6 @@ def generate_build_options(arguments):
|
||||
build_options_append('JERRY_CMDLINE_SNAPSHOT', arguments.jerry_cmdline_snapshot)
|
||||
build_options_append('JERRY_CMDLINE_TEST', arguments.jerry_cmdline_test)
|
||||
build_options_append('JERRY_EXT', arguments.jerry_ext)
|
||||
build_options_append('JERRY_LIBC', arguments.jerry_libc)
|
||||
build_options_append('JERRY_LIBM', arguments.jerry_libm)
|
||||
build_options_append('JERRY_PORT_DEFAULT', arguments.jerry_port_default)
|
||||
build_options_append('UNITTESTS', arguments.unittests)
|
||||
|
||||
@@ -25,12 +25,11 @@ fi
|
||||
JERRY_CORE_DIRS=`find jerry-core -type d`
|
||||
JERRY_EXT_DIRS=`find jerry-ext -type d`
|
||||
JERRY_PORT_DIRS=`find jerry-port -type d`
|
||||
JERRY_LIBC_DIRS=`find jerry-libc -type d`
|
||||
JERRY_LIBM_DIRS=`find jerry-libm -type d`
|
||||
|
||||
|
||||
INCLUDE_DIRS=()
|
||||
for DIR in $JERRY_CORE_DIRS $JERRY_EXT_DIRS $JERRY_PORT_DIRS $JERRY_LIBC_DIRS $JERRY_LIBM_DIRS
|
||||
for DIR in $JERRY_CORE_DIRS $JERRY_EXT_DIRS $JERRY_PORT_DIRS $JERRY_LIBM_DIRS
|
||||
do
|
||||
INCLUDE_DIRS=("${INCLUDE_DIRS[@]}" "-I$DIR")
|
||||
done
|
||||
@@ -44,4 +43,4 @@ cppcheck -j$CPPCHECK_JOBS --force \
|
||||
--exitcode-suppressions=tools/cppcheck/suppressions-list \
|
||||
--suppressions-list=tools/cppcheck/suppressions-list \
|
||||
"${INCLUDE_DIRS[@]}" \
|
||||
jerry-core jerry-ext jerry-port jerry-libc jerry-libm jerry-main tests/unit-*
|
||||
jerry-core jerry-ext jerry-port jerry-libm jerry-main tests/unit-*
|
||||
|
||||
@@ -42,7 +42,6 @@ INCLUDE_DIRS = [
|
||||
'cmake',
|
||||
'jerry-core',
|
||||
'jerry-ext',
|
||||
'jerry-libc',
|
||||
'jerry-libm',
|
||||
'jerry-main',
|
||||
'jerry-port',
|
||||
|
||||
@@ -23,7 +23,6 @@ then
|
||||
./tools/build.py --error-messages=on \
|
||||
--jerry-cmdline-snapshot=on \
|
||||
--jerry-debugger=on \
|
||||
--jerry-libc=off \
|
||||
--line-info=on \
|
||||
--mem-stats=on \
|
||||
--profile=es2015-subset \
|
||||
@@ -38,7 +37,6 @@ else
|
||||
./tools/build.py --error-messages=on \
|
||||
--jerry-cmdline-snapshot=on \
|
||||
--jerry-debugger=on \
|
||||
--jerry-libc=off \
|
||||
--line-info=on \
|
||||
--mem-stats=on \
|
||||
--profile=es2015-subset \
|
||||
|
||||
+1
-2
@@ -17,7 +17,6 @@
|
||||
JERRY_CORE_FILES=`find ./jerry-core -name "*.c" -or -name "*.h"`
|
||||
JERRY_EXT_FILES=`find ./jerry-ext -name "*.c" -or -name "*.h"`
|
||||
JERRY_PORT_FILES=`find ./jerry-port -name "*.c" -or -name "*.h"`
|
||||
JERRY_LIBC_FILES=`find ./jerry-libc -name "*.c" -or -name "*.h"`
|
||||
JERRY_LIBM_FILES=`find ./jerry-libm -name "*.c" -or -name "*.h"`
|
||||
JERRY_MAIN_FILES=`find ./jerry-main -name "*.c" -or -name "*.h"`
|
||||
UNIT_TEST_FILES=`find ./tests/unit-* -name "*.c" -or -name "*.h"`
|
||||
@@ -29,4 +28,4 @@ fi
|
||||
|
||||
vera++ -r tools/vera++ -p jerry \
|
||||
-e --no-duplicate \
|
||||
$MANUAL_CHECK_FILES $JERRY_CORE_FILES $JERRY_EXT_FILES $JERRY_PORT_FILES $JERRY_LIBC_FILES $JERRY_LIBM_FILES $JERRY_MAIN_FILES $UNIT_TEST_FILES
|
||||
$MANUAL_CHECK_FILES $JERRY_CORE_FILES $JERRY_EXT_FILES $JERRY_PORT_FILES $JERRY_LIBM_FILES $JERRY_MAIN_FILES $UNIT_TEST_FILES
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
wrongmathcall:tests/unit-libm/test-libm.inc.h
|
||||
variableScope:jerry-libm/*.c
|
||||
invalidPointerCast:jerry-libm/*.c
|
||||
arithOperationsOnVoidPointer:jerry-libc/*.c
|
||||
commaSeparatedReturn:*
|
||||
|
||||
+5
-7
@@ -75,7 +75,7 @@ JERRY_TESTS_OPTIONS = [
|
||||
Options('jerry_tests-es5.1-debug-cpointer_32bit',
|
||||
OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + ['--cpointer-32bit=on', '--mem-heap=1024']),
|
||||
Options('jerry_tests-es5.1-debug-external_context',
|
||||
OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + ['--jerry-libc=off', '--external-context=on']),
|
||||
OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + ['--external-context=on']),
|
||||
Options('jerry_tests-es2015_subset-debug',
|
||||
OPTIONS_PROFILE_ES2015 + OPTIONS_DEBUG),
|
||||
]
|
||||
@@ -111,7 +111,7 @@ TEST262_TEST_SUITE_OPTIONS = [
|
||||
# Test options for jerry-debugger
|
||||
DEBUGGER_TEST_OPTIONS = [
|
||||
Options('jerry_debugger_tests',
|
||||
['--debug', '--jerry-debugger=on', '--jerry-libc=off'])
|
||||
['--debug', '--jerry-debugger=on'])
|
||||
]
|
||||
|
||||
# Test options for buildoption-test
|
||||
@@ -132,14 +132,12 @@ JERRY_BUILDOPTIONS = [
|
||||
['--show-opcodes=on']),
|
||||
Options('buildoption_test-show_regexp_opcodes',
|
||||
['--show-regexp-opcodes=on']),
|
||||
Options('buildoption_test-compiler_default_libc',
|
||||
['--jerry-libc=off']),
|
||||
Options('buildoption_test-cpointer_32bit',
|
||||
['--jerry-libc=off', '--compile-flag=-m32', '--cpointer-32bit=on', '--system-allocator=on']),
|
||||
['--compile-flag=-m32', '--cpointer-32bit=on', '--system-allocator=on']),
|
||||
Options('buildoption_test-external_context',
|
||||
['--jerry-libc=off', '--external-context=on']),
|
||||
['--external-context=on']),
|
||||
Options('buildoption_test-shared_libs',
|
||||
['--jerry-libc=off', '--shared-libs=on']),
|
||||
['--shared-libs=on']),
|
||||
Options('buildoption_test-cmdline_test',
|
||||
['--jerry-cmdline-test=on']),
|
||||
Options('buildoption_test-cmdline_snapshot',
|
||||
|
||||
Reference in New Issue
Block a user