Skip to content

Commit 18d3f23

Browse files
committed
profile [minimal es5.1-full es2015-part]
1 parent 4ae83c9 commit 18d3f23

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

jerry-core/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set(JERRY_CORE_NAME jerry-core)
1818
project (${JERRY_CORE_NAME} C)
1919

2020
# Optional features
21-
set(FEATURE_PROFILE "full" CACHE STRING "Profile types: full, minimal")
21+
set(FEATURE_PROFILE "es5.1-full" CACHE STRING "Profile types: es5.1-full, minimal, es2015-part")
2222
set(FEATURE_ERROR_MESSAGES OFF CACHE BOOL "Enable error messages?")
2323
set(FEATURE_VALGRIND OFF CACHE BOOL "Enable Valgrind support?")
2424
set(FEATURE_VALGRIND_FREYA OFF CACHE BOOL "Enable Valgrind-Freya support?")
@@ -118,9 +118,12 @@ if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
118118
endif()
119119

120120
# Profile modes
121+
set(CONFIG_DISABLE_ES2015
122+
CONFIG_DISABLE_ARRAYBUFFER_BUILTIN)
121123
# Minimal profile
122124
if(FEATURE_PROFILE STREQUAL "minimal")
123125
set(DEFINES_JERRY ${DEFINES_JERRY}
126+
${CONFIG_DISABLE_ES2015}
124127
CONFIG_DISABLE_NUMBER_BUILTIN
125128
CONFIG_DISABLE_STRING_BUILTIN
126129
CONFIG_DISABLE_BOOLEAN_BUILTIN
@@ -131,7 +134,10 @@ if(FEATURE_PROFILE STREQUAL "minimal")
131134
CONFIG_DISABLE_DATE_BUILTIN
132135
CONFIG_DISABLE_REGEXP_BUILTIN
133136
CONFIG_DISABLE_ANNEXB_BUILTIN)
134-
elseif(NOT FEATURE_PROFILE STREQUAL "full")
137+
elseif(FEATURE_PROFILE STREQUAL "es5.1-full")
138+
set(DEFINES_JERRY ${DEFINES_JERRY}
139+
${CONFIG_DISABLE_ES2015})
140+
elseif(NOT FEATURE_PROFILE STREQUAL "es2015-part")
135141
message(FATAL_ERROR "FEATURE_PROFILE='${FEATURE_PROFILE}' isn't supported")
136142
endif()
137143

tools/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def devhelp(help):
4949
parser.add_argument('--builddir', metavar='DIR', action='store', default=BUILD_DIR, help='specify output directory (default: %(default)s)')
5050
parser.add_argument('--lto', metavar='X', choices=['ON', 'OFF'], default='ON', type=str.upper, help='enable link-time optimizations (%(choices)s; default: %(default)s)')
5151
parser.add_argument('--all-in-one', metavar='X', choices=['ON', 'OFF'], default='OFF', type=str.upper, help='all-in-one build (%(choices)s; default: %(default)s)')
52-
parser.add_argument('--profile', metavar='PROFILE', choices=['full', 'minimal'], default='full', type=str.lower, help='specify the profile (%(choices)s; default: %(default)s)')
52+
parser.add_argument('--profile', metavar='PROFILE', choices=['es5.1-full', 'minimal', 'es2015-part'], default='es5.1-full', type=str.lower, help='specify the profile (%(choices)s; default: %(default)s)')
5353
parser.add_argument('--error-messages', metavar='X', choices=['ON', 'OFF'], default='OFF', type=str.upper, help='enable error messages (%(choices)s; default: %(default)s)')
5454
parser.add_argument('--snapshot-save', metavar='X', choices=['ON', 'OFF'], default='OFF', type=str.upper, help='enable saving snapshot files (%(choices)s; default: %(default)s)')
5555
parser.add_argument('--snapshot-exec', metavar='X', choices=['ON', 'OFF'], default='OFF', type=str.upper, help='enable executing snapshot files (%(choices)s; default: %(default)s)')

0 commit comments

Comments
 (0)