iwasm.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # Copyright (c) 2021, RT-Thread Development Team
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  5. #
  6. set(CMAKE_ASM_COMPILER_WORKS 1)
  7. set(WAMR_BUILD_PLATFORM "rt-thread")
  8. set(WAMR_BUILD_TARGET "ARM")
  9. #set(WAMR_BUILD_INTERP 1)
  10. #set(WAMR_BUILD_FAST_INTERP 1)
  11. #set(WAMR_BUILD_AOT 0)
  12. #set(WAMR_BUILD_JIT 0)
  13. #set(WAMR_BUILD_LIBC_BUILTIN 1)
  14. #set(WAMR_BUILD_LIBC_WASI 0)
  15. if (NOT CMAKE_BUILD_TYPE)
  16. set(CMAKE_BUILD_TYPE Release)
  17. endif ()
  18. if (NOT DEFINED WAMR_BUILD_INTERP)
  19. # Enable Interpreter by default
  20. set (WAMR_BUILD_INTERP 1)
  21. endif ()
  22. if (NOT DEFINED WAMR_BUILD_AOT)
  23. # Enable AOT by default.
  24. set (WAMR_BUILD_AOT 0)
  25. endif ()
  26. # Disable JIT by default.
  27. set (WAMR_BUILD_JIT 0)
  28. if (NOT DEFINED WAMR_BUILD_LIBC_BUILTIN)
  29. # Enable libc builtin support by default
  30. set (WAMR_BUILD_LIBC_BUILTIN 1)
  31. endif ()
  32. set (WAMR_BUILD_LIBC_WASI 0)
  33. if (NOT DEFINED WAMR_BUILD_FAST_INTERP)
  34. # Enable fast interpreter
  35. set (WAMR_BUILD_FAST_INTERP 1)
  36. endif ()
  37. set (WAMR_BUILD_MULTI_MODULE 0)
  38. set (WAMR_BUILD_LIB_PTHREAD 0)
  39. set (WAMR_BUILD_MINI_LOADER 0)
  40. set (WAMR_BUILD_SIMD 0)
  41. set(WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../../..)
  42. set(CMAKE_ASM_COMPILER_WORKS 1)
  43. include(${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
  44. file (GLOB wamr_entry_src
  45. ${WAMR_ROOT_DIR}/product-mini/platforms/rt-thread/rtt_wamr_entry.c
  46. )
  47. set(WAMR_SOURCE ${wamr_entry_src} ${WAMR_RUNTIME_LIB_SOURCE})