File tree Expand file tree Collapse file tree 6 files changed +15
-1
lines changed
Expand file tree Collapse file tree 6 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ find_package(Erlang)
2828find_package (Elixir)
2929find_package (Gleam)
3030
31+ option (AVM_ENABLE_OLD_OTP_VERSIONS "Enable OTP version < 26" ON )
3132option (AVM_DISABLE_FP "Disable floating point support." OFF )
3233option (AVM_DISABLE_SMP "Disable SMP." OFF )
3334option (AVM_DISABLE_TASK_DRIVER "Disable task driver support." OFF )
Original file line number Diff line number Diff line change @@ -199,6 +199,12 @@ if(AVM_SELECT_IN_TASK)
199199 target_compile_definitions (libAtomVM PUBLIC AVM_SELECT_IN_TASK)
200200endif ()
201201
202+ # Start phasing out old OTP versions
203+ if (NOT AVM_ENABLE_OLD_OTP_VERSIONS)
204+ target_compile_definitions (${COMPONENT_LIB} PRIVATE MINIMUM_OTP_COMPILER_VERSION=26)
205+ target_compile_definitions (${COMPONENT_LIB} PRIVATE MAXIMUM_OTP_COMPILER_VERSION=29)
206+ endif ()
207+
202208include (CheckIncludeFile)
203209CHECK_INCLUDE_FILE(stdatomic.h STDATOMIC_INCLUDE)
204210include (CheckCSourceCompiles)
Original file line number Diff line number Diff line change 4949
5050// These constants can be used to reduce the size of the VM for a specific
5151// range of compiler versions
52+ #ifndef MINIMUM_OTP_COMPILER_VERSION
5253#define MINIMUM_OTP_COMPILER_VERSION 21
53- #define MAXIMUM_OTP_COMPILER_VERSION 26
54+ #endif
55+ #ifndef MAXIMUM_OTP_COMPILER_VERSION
56+ #define MAXIMUM_OTP_COMPILER_VERSION 29
57+ #endif
5458
5559#ifdef __cplusplus
5660extern "C" {
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ if (-std=gnu99 IN_LIST c_compile_options )
8080endif ()
8181
8282# Options that make sense for this platform
83+ option (AVM_ENABLE_OLD_OTP_VERSIONS "Enable OTP version < 26" OFF )
8384option (AVM_DISABLE_SMP "Disable SMP." OFF )
8485option (AVM_USE_32BIT_FLOAT "Use 32 bit floats." OFF )
8586option (AVM_VERBOSE_ABORT "Print module and line number on VM abort" OFF )
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ set(HAVE_EXECVE "" CACHE INTERNAL "Have symbol execve" FORCE)
5858set (HAVE_GETCWD "" CACHE INTERNAL "Have symbol getcwd" FORCE)
5959
6060# Options that make sense for this platform
61+ option (AVM_ENABLE_OLD_OTP_VERSIONS "Enable OTP version < 26" OFF )
6162option (AVM_DISABLE_SMP "Disable SMP support." OFF )
6263option (AVM_USE_32BIT_FLOAT "Use 32 bit floats." OFF )
6364option (AVM_VERBOSE_ABORT "Print module and line number on VM abort" OFF )
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../CMakeModules
2525set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} )
2626
2727# Options that make sense for this platform
28+ option (AVM_ENABLE_OLD_OTP_VERSIONS "Enable OTP version < 26" OFF )
2829option (AVM_USE_32BIT_FLOAT "Use 32 bit floats." ON )
2930option (AVM_VERBOSE_ABORT "Print module and line number on VM abort" OFF )
3031option (AVM_CREATE_STACKTRACES "Create stacktraces" ON )
You can’t perform that action at this time.
0 commit comments