Set js-parser feature in the build script. (#1482)
Renamed FEATURE_PARSER_DISABLE to FEATURE_JS_PARSER. Fixed the build error that occurred in case of disabled js-parser. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
+27
-22
@@ -17,26 +17,26 @@ set(JERRY_CORE_NAME jerry-core)
|
||||
project (${JERRY_CORE_NAME} C)
|
||||
|
||||
# Optional features
|
||||
set(FEATURE_CPOINTER_32_BIT OFF CACHE BOOL "Enable 32 bit compressed pointers?")
|
||||
set(FEATURE_ERROR_MESSAGES OFF CACHE BOOL "Enable error messages?")
|
||||
set(FEATURE_MEM_STATS OFF CACHE BOOL "Enable memory statistics?")
|
||||
set(FEATURE_MEM_STRESS_TEST OFF CACHE BOOL "Enable mem-stress test?")
|
||||
set(FEATURE_PARSER_DISABLE OFF CACHE BOOL "Disable the parser and 'eval' and use only snapshots?")
|
||||
set(FEATURE_PARSER_DUMP OFF CACHE BOOL "Enable parser byte-code dumps?")
|
||||
set(FEATURE_CPOINTER_32_BIT OFF CACHE BOOL "Enable 32 bit compressed pointers?")
|
||||
set(FEATURE_ERROR_MESSAGES OFF CACHE BOOL "Enable error messages?")
|
||||
set(FEATURE_JS_PARSER ON CACHE BOOL "Enable js-parser?")
|
||||
set(FEATURE_MEM_STATS OFF CACHE BOOL "Enable memory statistics?")
|
||||
set(FEATURE_MEM_STRESS_TEST OFF CACHE BOOL "Enable mem-stress test?")
|
||||
set(FEATURE_PARSER_DUMP OFF CACHE BOOL "Enable parser byte-code dumps?")
|
||||
set(FEATURE_PROFILE "es5.1" CACHE STRING "Profile types: es5.1, minimal, es2015-subset")
|
||||
set(FEATURE_REGEXP_DUMP OFF CACHE BOOL "Enable regexp byte-code dumps?")
|
||||
set(FEATURE_SNAPSHOT_EXEC OFF CACHE BOOL "Enable executing snapshot files?")
|
||||
set(FEATURE_SNAPSHOT_SAVE OFF CACHE BOOL "Enable saving snapshot files?")
|
||||
set(FEATURE_VALGRIND OFF CACHE BOOL "Enable Valgrind support?")
|
||||
set(FEATURE_VALGRIND_FREYA OFF CACHE BOOL "Enable Valgrind-Freya support?")
|
||||
set(MEM_HEAP_SIZE_KB "512" CACHE STRING "Size of memory heap, in kilobytes")
|
||||
set(FEATURE_REGEXP_DUMP OFF CACHE BOOL "Enable regexp byte-code dumps?")
|
||||
set(FEATURE_SNAPSHOT_EXEC OFF CACHE BOOL "Enable executing snapshot files?")
|
||||
set(FEATURE_SNAPSHOT_SAVE OFF CACHE BOOL "Enable saving snapshot files?")
|
||||
set(FEATURE_VALGRIND OFF CACHE BOOL "Enable Valgrind support?")
|
||||
set(FEATURE_VALGRIND_FREYA OFF CACHE BOOL "Enable Valgrind-Freya support?")
|
||||
set(MEM_HEAP_SIZE_KB "512" CACHE STRING "Size of memory heap, in kilobytes")
|
||||
|
||||
# Status messages
|
||||
message(STATUS "FEATURE_CPOINTER_32_BIT " ${FEATURE_CPOINTER_32_BIT})
|
||||
message(STATUS "FEATURE_ERROR_MESSAGES " ${FEATURE_ERROR_MESSAGES})
|
||||
message(STATUS "FEATURE_JS_PARSER " ${FEATURE_JS_PARSER})
|
||||
message(STATUS "FEATURE_MEM_STATS " ${FEATURE_MEM_STATS})
|
||||
message(STATUS "FEATURE_MEM_STRESS_TEST " ${FEATURE_MEM_STRESS_TEST})
|
||||
message(STATUS "FEATURE_PARSER_DISABLE " ${FEATURE_PARSER_DISABLE})
|
||||
message(STATUS "FEATURE_PARSER_DUMP " ${FEATURE_PARSER_DUMP})
|
||||
message(STATUS "FEATURE_PROFILE " ${FEATURE_PROFILE})
|
||||
message(STATUS "FEATURE_REGEXP_DUMP " ${FEATURE_REGEXP_DUMP})
|
||||
@@ -134,6 +134,20 @@ if(FEATURE_ERROR_MESSAGES)
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_ENABLE_ERROR_MESSAGES)
|
||||
endif()
|
||||
|
||||
# JS-Parser
|
||||
if(FEATURE_JS_PARSER)
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_JS_PARSER)
|
||||
else()
|
||||
if(NOT FEATURE_SNAPSHOT_EXEC MATCHES ON)
|
||||
set(FEATURE_SNAPSHOT_EXEC ON)
|
||||
message(STATUS "JS-Parser has been disabled, snapshot is now on")
|
||||
endif()
|
||||
if(FEATURE_PARSER_DUMP)
|
||||
set(FEATURE_PARSER_DUMP OFF)
|
||||
message(STATUS "Parser byte-code dumps has been disabled")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Memory statistics
|
||||
if(FEATURE_MEM_STATS)
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JMEM_STATS)
|
||||
@@ -144,15 +158,6 @@ if(FEATURE_MEM_STRESS_TEST)
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JMEM_GC_BEFORE_EACH_ALLOC)
|
||||
endif()
|
||||
|
||||
# Disable parser and enable snapshots
|
||||
if(FEATURE_PARSER_DISABLE)
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_DISABLE_PARSER)
|
||||
if(NOT FEATURE_SNAPSHOT_EXEC MATCHES ON)
|
||||
set(FEATURE_SNAPSHOT_EXEC ON)
|
||||
message(STATUS "Parser has been disabled, snapshot is now on")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Parser byte-code dumps
|
||||
if(FEATURE_PARSER_DUMP)
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} PARSER_DUMP_BYTE_CODE)
|
||||
|
||||
Reference in New Issue
Block a user