Skip to content

Commit f6cbccf

Browse files
gountharclaude
authored andcommitted
fix: make demo container building optional via cmake option
Add OCRE_BUILD_DEMO_CONTAINERS option (default ON) to control whether demo_containers.cmake is included. This allows building the Ocre runtime on platforms where WASI SDK is not available (e.g. riscv64), by passing -DOCRE_BUILD_DEMO_CONTAINERS=OFF. The demo containers require the ocre-sdk submodule which uses WASI SDK to compile C to WebAssembly. WASI SDK ships pre-built binaries for x86_64 and arm64 only, so the demo build fails on other architectures. The runtime itself (ocre_mini, ocre_demo, ocre_cmd) builds and runs correctly on riscv64 without this dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Bruno Verachten <gounthar@gmail.com>
1 parent 0133eac commit f6cbccf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ set(CMAKE_C_STANDARD 99)
1313

1414
set(WAMR_BUILD_PLATFORM linux)
1515

16-
include (src/samples/demo/demo_containers.cmake)
16+
option(OCRE_BUILD_DEMO_CONTAINERS "Build demo containers from ocre-sdk (requires WASI SDK)" ON)
17+
18+
if(OCRE_BUILD_DEMO_CONTAINERS)
19+
include (src/samples/demo/demo_containers.cmake)
20+
endif()
1721

1822
# uthash
1923
add_subdirectory(src/uthash)

0 commit comments

Comments
 (0)