Skip to content

Commit c426504

Browse files
committed
Reduce VM size by supporting compilers from 3 last OTP releases
Update few CI tests to optimize VM for the tested OTP version Fix accordingly conditions for following opcodes: - OP_BS_MATCH_STRING is generated by at least OTP 21 to 27 - OP_BS_TEST_UNIT is generated by at least OTP 21 to 25 Signed-off-by: Paul Guyot <[email protected]>
1 parent 7caa566 commit c426504

18 files changed

+182
-23
lines changed

.github/workflows/build-and-test-macos.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
os: ["macos-13", "macos-14", "macos-15"]
4141
otp: ["24", "25", "26", "27"]
4242

43+
include:
44+
- otp: "24"
45+
cmake_opts_other: "-DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=24 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=24"
46+
4347
steps:
4448
# Setup
4549
- name: "Checkout repo"
@@ -83,7 +87,7 @@ jobs:
8387
working-directory: build
8488
run: |
8589
export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:/opt/homebrew/opt/erlang@${{ matrix.otp }}/bin:$PATH"
86-
cmake -DAVM_WARNINGS_ARE_ERRORS=ON -G Ninja ..
90+
cmake -DAVM_WARNINGS_ARE_ERRORS=ON ${{ matrix.cmake_opts_other }} -G Ninja ..
8791
8892
- name: "Build: run ninja"
8993
working-directory: build

.github/workflows/build-and-test-other.yaml

+16-2
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ jobs:
129129
name: test-modules
130130
path: build_tests
131131

132+
- name: Skip compilation of Erlang code
133+
run: |
134+
sed -e 's|add_subdirectory(libs)|# add_subdirectory(libs)|g' \
135+
-e 's|add_subdirectory(examples)|# add_subdirectory(examples)|g' \
136+
-i CMakeLists.txt
137+
sed -e 's|add_subdirectory(erlang_tests)|# add_subdirectory(erlang_tests)|g' \
138+
-e 's|add_subdirectory(libs/|# add_subdirectory(libs/|g' \
139+
-e 's|add_dependencies(test-erlang erlang_test_modules)|# add_dependencies(test-erlang erlang_test_modules)|g' \
140+
-i tests/CMakeLists.txt
141+
132142
- name: Set up QEMU
133143
uses: docker/setup-qemu-action@v3
134144

@@ -159,13 +169,17 @@ jobs:
159169
mkdir -p build &&
160170
cd build &&
161171
cmake .. ${{ matrix.cmake_opts }} &&
172+
mkdir -p tests/erlang_tests/code_load/beams/ &&
162173
cp ../build_tests/tests/erlang_tests/*.beam tests/erlang_tests/ &&
163174
cp ../build_tests/tests/erlang_tests/code_load/*.{avm,beam,hrl} tests/erlang_tests/code_load/ &&
164-
mkdir -p tests/erlang_tests/code_load/beams/ &&
165175
cp ../build_tests/tests/erlang_tests/code_load/beams/*.beam tests/erlang_tests/code_load/beams/ &&
176+
mkdir -p tests/libs/etest/ &&
166177
cp ../build_tests/tests/libs/etest/*.avm tests/libs/etest/ &&
167-
cp ../build_tests/tests/libs/estdlib/*.avm tests/libs/estdlib/ &&
178+
mkdir -p tests/libs/estdlib/ &&
179+
cp ../build_tests/tests/libs/estdlib/*.avm tests/libs/estdlib/ &&
180+
mkdir -p tests/libs/eavmlib/ &&
168181
cp ../build_tests/tests/libs/eavmlib/*.avm tests/libs/eavmlib/ &&
182+
mkdir -p tests/libs/alisp/ &&
169183
cp ../build_tests/tests/libs/alisp/*.avm tests/libs/alisp/ &&
170184
make AtomVM &&
171185
make test-erlang &&

.github/workflows/build-and-test.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ jobs:
202202
otp: "21"
203203
elixir_version: "1.7"
204204
rebar3_version: "3.15.2"
205+
cmake_opts_other: "-DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=21 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=21"
205206

206207
- os: "ubuntu-20.04"
207208
cc: "cc"
@@ -210,6 +211,7 @@ jobs:
210211
otp: "22"
211212
elixir_version: "1.8"
212213
rebar3_version: "3.18.0"
214+
cmake_opts_other: "-DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=22 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=22"
213215

214216
- os: "ubuntu-20.04"
215217
cc: "cc"
@@ -218,6 +220,7 @@ jobs:
218220
otp: "23"
219221
elixir_version: "1.11"
220222
rebar3_version: "3.20.0"
223+
cmake_opts_other: "-DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=23 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=23"
221224

222225
- os: "ubuntu-22.04"
223226
cc: "cc"
@@ -226,6 +229,7 @@ jobs:
226229
otp: "24"
227230
elixir_version: "1.14"
228231
rebar3_version: "3.23.0"
232+
cmake_opts_other: "-DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=24 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=24"
229233

230234
- os: "ubuntu-24.04"
231235
cc: "cc"
@@ -275,9 +279,9 @@ jobs:
275279
cc: "gcc-10"
276280
cxx: "g++-10"
277281
cflags: "-m32 -O3"
278-
otp: "23"
279-
elixir_version: "1.11"
280-
rebar3_version: "3.20.0"
282+
otp: "27"
283+
elixir_version: "1.17"
284+
rebar3_version: "3.24.0"
281285
# Use Werror so we get an error with 32 bit specific warnings
282286
cmake_opts_other: "-DAVM_CREATE_STACKTRACES=off -DAVM_WARNINGS_ARE_ERRORS=ON"
283287
arch: "i386"

.github/workflows/esp32-build.yaml

+17-4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ jobs:
4949
idf-version: 'v5.0.7'
5050
- esp-idf-target: "esp32c3"
5151
idf-version: 'v5.1.5'
52+
53+
# ESP-IDF 5.0.7 and 5.1.5 containers are based on Ubuntu focal which has Erlang/OTP 22
54+
# ESP-IDF 5.2.3 and 5.3.2 containers are based on Ubuntu jammy which has Erlang/OTP 24
55+
include:
56+
- idf-version: 'v5.0.7'
57+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=22 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=22
58+
- idf-version: 'v5.1.5'
59+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=22 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=22
60+
- idf-version: 'v5.2.3'
61+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=24 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=24
62+
- idf-version: 'v5.3.2'
63+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=24 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=24
64+
5265
steps:
5366
- name: Checkout repo
5467
uses: actions/checkout@v4
@@ -152,8 +165,8 @@ jobs:
152165
echo "CONFIG_ESP_WIFI_RX_IRAM_OPT=n" >> sdkconfig.defaults
153166
. $IDF_PATH/export.sh
154167
export IDF_TARGET=${{matrix.esp-idf-target}}
155-
idf.py set-target ${{matrix.esp-idf-target}}
156-
idf.py build
168+
idf.py ${{matrix.cmake_opts}} set-target ${{matrix.esp-idf-target}}
169+
idf.py ${{matrix.cmake_opts}} build
157170
158171
- name: Run ESP32 tests using qemu with memory checks build
159172
working-directory: ./src/platforms/esp32/test/
@@ -173,8 +186,8 @@ jobs:
173186
. $IDF_PATH/export.sh
174187
export IDF_TARGET=${{matrix.esp-idf-target}}
175188
export PATH=${PATH}:${HOME}/.cache/rebar3/bin
176-
idf.py set-target ${{matrix.esp-idf-target}}
177-
idf.py build
189+
idf.py ${{matrix.cmake_opts}} set-target ${{matrix.esp-idf-target}}
190+
idf.py ${{matrix.cmake_opts}} build
178191
179192
- name: Run ESP32 tests using qemu
180193
working-directory: ./src/platforms/esp32/test/

.github/workflows/run-tests-with-beam.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -43,45 +43,55 @@ jobs:
4343
- os: "ubuntu-24.04"
4444
test_erlang_opts: "-s prime_smp"
4545
container: erlang:21
46+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=21 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=21
4647

4748
- os: "ubuntu-24.04"
4849
test_erlang_opts: "-s prime_smp"
4950
container: erlang:22
51+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=22 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=22
5052

5153
- os: "ubuntu-24.04"
5254
test_erlang_opts: "-s prime_smp"
5355
container: erlang:23
56+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=23 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=23
5457

5558
- os: "ubuntu-24.04"
5659
test_erlang_opts: "-s prime_smp"
5760
container: erlang:24
61+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=24 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=24
5862

5963
- os: "ubuntu-24.04"
6064
test_erlang_opts: "-s prime_smp"
6165
container: erlang:25
66+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=25 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=25
6267

6368
- os: "ubuntu-24.04"
6469
test_erlang_opts: "-s prime_smp"
6570
otp: "26"
6671
container: erlang:26
72+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=26 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=26
6773

6874
- os: "ubuntu-24.04"
6975
test_erlang_opts: "-s prime_smp"
7076
otp: "27"
7177
container: erlang:27
78+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=27 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=27
7279

7380
# This is ARM64
7481
- os: "macos-14"
7582
otp: "25"
7683
path_prefix: "/opt/homebrew/opt/erlang@25/bin:"
84+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=25 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=25
7785

7886
- os: "macos-14"
7987
otp: "26"
8088
path_prefix: "/opt/homebrew/opt/erlang@26/bin:"
89+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=26 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=26
8190

8291
- os: "macos-14"
8392
otp: "27"
8493
path_prefix: "/opt/homebrew/opt/erlang@27/bin:"
94+
cmake_opts: -DAVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION=27 -DAVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION=27
8595
steps:
8696
# Setup
8797
- name: "Checkout repo"

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ option(AVM_RELEASE "Build an AtomVM release" OFF)
3636
option(AVM_CREATE_STACKTRACES "Create stacktraces" ON)
3737
option(AVM_BUILD_RUNTIME_ONLY "Only build the AtomVM runtime" OFF)
3838
option(COVERAGE "Build for code coverage" OFF)
39+
set(AVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION "25" CACHE STRING "Minimum supported OTP Release for Erlang compiler")
40+
set(AVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION "28" CACHE STRING "Maximum supported OTP Release for Erlang compiler")
3941

4042
if((${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") OR
4143
(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR

CMakeModules/FindElixir.cmake

+6-7
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
1919
#
2020

21-
find_program(ELIXIRC_PATH elixirc)
21+
find_program(ELIXIRC_EXECUTABLE elixirc)
2222

23-
if (ELIXIRC_PATH)
24-
message("Found Elixir")
25-
set(Elixir_FOUND TRUE)
26-
elseif(Elixir_FIND_REQUIRED)
27-
message(FATAL_ERROR "Elixir compiler not found")
28-
endif()
23+
include(FindPackageHandleStandardArgs)
24+
find_package_handle_standard_args(Elixir
25+
FOUND_VAR Elixir_FOUND
26+
REQUIRED_VARS ELIXIRC_EXECUTABLE
27+
)

CMakeModules/FindErlang.cmake

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#
2+
# This file is part of AtomVM.
3+
#
4+
# Copyright 2025 Paul Guyot <[email protected]>
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
19+
#
20+
21+
cmake_minimum_required(VERSION 3.13)
22+
23+
find_program(ERLC_EXECUTABLE erlc)
24+
find_program(ERL_EXECUTABLE erl)
25+
26+
if (ERLC_EXECUTABLE AND ERL_EXECUTABLE)
27+
execute_process(COMMAND erl -eval "io:put_chars(erlang:system_info(otp_release))." -s init stop -noshell OUTPUT_VARIABLE Erlang_VERSION)
28+
endif()
29+
30+
include(FindPackageHandleStandardArgs)
31+
32+
if (CMAKE_VERSION VERSION_LESS 3.19)
33+
# Handle version range ourselves
34+
if (Erlang_FIND_VERSION AND ERL_EXECUTABLE)
35+
string(REPLACE "..." ";" Erlang_FIND_VERSION_LIST ${Erlang_FIND_VERSION})
36+
list(LENGTH Erlang_FIND_VERSION_LIST Erlang_FIND_VERSION_LIST_LEN)
37+
if (Erlang_FIND_VERSION_LIST_LEN EQUAL 1)
38+
find_package_handle_standard_args(Erlang
39+
FOUND_VAR Erlang_FOUND
40+
REQUIRED_VARS ERLC_EXECUTABLE ERL_EXECUTABLE
41+
VERSION_VAR Erlang_VERSION
42+
)
43+
elseif(${Erlang_FIND_VERSION_LIST_LEN} EQUAL 2)
44+
list(GET Erlang_FIND_VERSION_LIST 0 Erlang_FIND_VERSION_MIN)
45+
list(GET Erlang_FIND_VERSION_LIST 1 Erlang_FIND_VERSION_MAX)
46+
if (${Erlang_VERSION} LESS Erlang_FIND_VERSION_MIN)
47+
message(FATAL_ERROR "-- Found Erlang: ${ERL_EXECUTABLE} but OTP Release ${Erlang_VERSION} is less than required ${Erlang_FIND_VERSION_MIN}")
48+
endif()
49+
if (${Erlang_VERSION} GREATER Erlang_FIND_VERSION_MAX)
50+
message(FATAL_ERROR "-- Found Erlang: ${ERL_EXECUTABLE} but OTP Release ${Erlang_VERSION} is greater than supported ${Erlang_FIND_VERSION_MAX}")
51+
endif()
52+
find_package_handle_standard_args(Erlang
53+
FOUND_VAR Erlang_FOUND
54+
REQUIRED_VARS ERLC_EXECUTABLE ERL_EXECUTABLE
55+
)
56+
else()
57+
message(FATAL_ERROR "-- Found Erlang: ${ERL_EXECUTABLE} but version range syntax is incorrect ${Erlang_FIND_VERSION}")
58+
endif()
59+
else()
60+
find_package_handle_standard_args(Erlang
61+
FOUND_VAR Erlang_FOUND
62+
REQUIRED_VARS ERLC_EXECUTABLE ERL_EXECUTABLE
63+
)
64+
endif()
65+
else()
66+
find_package_handle_standard_args(Erlang
67+
FOUND_VAR Erlang_FOUND
68+
HANDLE_VERSION_RANGE
69+
REQUIRED_VARS ERLC_EXECUTABLE ERL_EXECUTABLE
70+
VERSION_VAR Erlang_VERSION
71+
)
72+
endif()

examples/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ if (Gleam_FOUND)
3636
else()
3737
message(WARNING "-- gleam not found, skipping Gleam examples")
3838
endif()
39+
40+
# Ensure erlang version is compatible with VM
41+
find_package(Erlang ${AVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION}...${AVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION} REQUIRED)

libs/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
1919
#
2020

21-
cmake_minimum_required (VERSION 3.12)
21+
cmake_minimum_required (VERSION 3.13)
2222
project(libs)
2323

2424
add_subdirectory(estdlib/src)
@@ -65,6 +65,9 @@ else()
6565
message("Dialyzer was not found -- skipping PLT build")
6666
endif()
6767

68+
# Ensure erlang version is compatible with VM
69+
find_package(Erlang ${AVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION}...${AVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION} REQUIRED)
70+
6871
install(
6972
FILES ${CMAKE_CURRENT_BINARY_DIR}/atomvmlib.avm
7073
DESTINATION lib/atomvm

src/libAtomVM/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ endif()
132132
if (ADVANCED_TRACING)
133133
target_compile_definitions(libAtomVM PUBLIC ENABLE_ADVANCED_TRACE)
134134
endif()
135+
if (AVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION)
136+
target_compile_definitions(libAtomVM PUBLIC MINIMUM_OTP_COMPILER_VERSION=${AVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION})
137+
endif()
138+
if (AVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION)
139+
target_compile_definitions(libAtomVM PUBLIC MAXIMUM_OTP_COMPILER_VERSION=${AVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION})
140+
endif()
135141

136142
target_link_libraries(libAtomVM PUBLIC m)
137143
include(CheckCSourceCompiles)

src/libAtomVM/opcodesswitch.h

+7-5
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@
4646

4747
// These constants can be used to reduce the size of the VM for a specific
4848
// range of compiler versions
49-
#define MINIMUM_OTP_COMPILER_VERSION 21
50-
#define MAXIMUM_OTP_COMPILER_VERSION 26
49+
#ifndef MINIMUM_OTP_COMPILER_VERSION
50+
#define MINIMUM_OTP_COMPILER_VERSION 25
51+
#endif
52+
#ifndef MAXIMUM_OTP_COMPILER_VERSION
53+
#define MAXIMUM_OTP_COMPILER_VERSION 28
54+
#endif
5155

5256
#ifdef __cplusplus
5357
extern "C" {
@@ -4815,7 +4819,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
48154819
}
48164820
#endif
48174821

4818-
#if MINIMUM_OTP_COMPILER_VERSION <= 25
48194822
case OP_BS_MATCH_STRING: {
48204823
uint32_t fail;
48214824
DECODE_LABEL(fail, pc)
@@ -4887,7 +4890,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
48874890
#endif
48884891
break;
48894892
}
4890-
#endif
48914893

48924894
#if MINIMUM_OTP_COMPILER_VERSION <= 21
48934895
case OP_BS_SAVE2: {
@@ -4989,7 +4991,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
49894991
break;
49904992
}
49914993

4992-
#if MINIMUM_OTP_COMPILER_VERSION <= 24
4994+
#if MINIMUM_OTP_COMPILER_VERSION <= 25
49934995
case OP_BS_TEST_UNIT: {
49944996
uint32_t fail;
49954997
DECODE_LABEL(fail, pc)

src/platforms/emscripten/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ endif ()
3232
option(AVM_DISABLE_SMP "Disable SMP." OFF)
3333
option(AVM_USE_32BIT_FLOAT "Use 32 bit floats." OFF)
3434
option(AVM_VERBOSE_ABORT "Print module and line number on VM abort" OFF)
35+
set(AVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION "25" CACHE STRING "Minimum supported OTP Release for Erlang compiler")
36+
set(AVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION "28" CACHE STRING "Maximum supported OTP Release for Erlang compiler")
3537

3638
set(
3739
PLATFORM_LIB_SUFFIX

src/platforms/esp32/test/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ set(AVM_SELECT_IN_TASK ON)
5757

5858
project(atomvm-esp32-test)
5959

60+
# Ensure erlang version is compatible with VM
61+
set(AVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION "25" CACHE STRING "Minimum supported OTP Release for Erlang compiler")
62+
set(AVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION "28" CACHE STRING "Maximum supported OTP Release for Erlang compiler")
63+
find_package(Erlang ${AVM_MINIMUM_OTP_RELEASE_COMPILER_VERSION}...${AVM_MAXIMUM_OTP_RELEASE_COMPILER_VERSION} REQUIRED)
64+
6065
# esp-idf does not use compile_feature but instead sets version in
6166
# c_compile_options
6267
# Ensure project is compiled with at least C11

0 commit comments

Comments
 (0)