mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Until now, the engine's feature set was configurable either via `CONFIG_*` macro guards defined individually on compiler command line or via profiles (which are text files listing macro guards, picked up by the cmake build system and turning them into compiler command line options). And the features under profile control are all enabled by default (i.e., all macros are `CONFIG_DISABLE_*`). This causes a maintenance issue when new features are added to the engine, because the disabling macros have to be added to all profiles that don't include the new features. This can even cause "compatibility break" for applications that embed JerryScript but don't use the cmake or the python build system, because then profiles are unavailable and all feature disabling guards have to be explicitly passed to the compiler. (I.e., if such an application wants to use the ES5.1 feature set, it must define all the ES2015 disable macros; if the engine is developed further and a new ES2015 feature gets implemented, then the new feature will sneak into the application's binary unless its own build system is changed to add the new feature guard.) Even the in-repo example Curie BSP target seems to have suffered from this maintenance problem. This patch introduces two new grouping macro guards that enable the disabling of all ES5.1 builtins and all ES2015 features. As the grouping logic is in config.h, the maintenance of non-cmake-based build systems becomes easier (and there is no change for the python and cmake-based build systems). JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
4 lines
85 B
Plaintext
4 lines
85 B
Plaintext
CONFIG_DISABLE_BUILTINS
|
|
CONFIG_DISABLE_ES2015
|
|
CONFIG_DISABLE_UNICODE_CASE_CONVERSION
|