mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-09-24 04:49:40 +00:00
Move RUST_TARGET setup to easy-settings.cmake.
RustAddLibrary was setting RUST_TARGET to a fixed string with a potential override by the caller. The later is not used in our builds so move it to east-settings.cmake so it can be changed from the cmd line. Change-Id: I17f16cf8df16e6d7e997091165e8df097f7fcc32 GitOrigin-RevId: 98b687fd600e328cacbaf3c1127eef841d664a92
This commit is contained in:
@@ -21,11 +21,10 @@ set(CARGO_OPTIONS
|
|||||||
# lib_name: Name of library that is created
|
# lib_name: Name of library that is created
|
||||||
# SOURCE_DIR: source directory of cargo project
|
# SOURCE_DIR: source directory of cargo project
|
||||||
# BUILD_DIR: directory for cargo build output
|
# BUILD_DIR: directory for cargo build output
|
||||||
# TARGET: custom target to use. See in ../rust_targets/ for list of available targets.
|
|
||||||
# LIB_FILENAME: filename of library created by cargo
|
# LIB_FILENAME: filename of library created by cargo
|
||||||
# DEPENDS: And target or file dependencies that need to be run before cargo
|
# DEPENDS: And target or file dependencies that need to be run before cargo
|
||||||
function(RustAddLibrary lib_name)
|
function(RustAddLibrary lib_name)
|
||||||
cmake_parse_arguments(PARSE_ARGV 1 RUST "" "SOURCE_DIR;BUILD_DIR;TARGET;LIB_FILENAME" "DEPENDS")
|
cmake_parse_arguments(PARSE_ARGV 1 RUST "" "SOURCE_DIR;BUILD_DIR;LIB_FILENAME" "DEPENDS")
|
||||||
if(NOT "${RUST_UNPARSED_ARGUMENTS}" STREQUAL "")
|
if(NOT "${RUST_UNPARSED_ARGUMENTS}" STREQUAL "")
|
||||||
message(FATAL_ERROR "Unknown arguments to RustAddLibrary ${RUST_UNPARSED_ARGUMENTS}")
|
message(FATAL_ERROR "Unknown arguments to RustAddLibrary ${RUST_UNPARSED_ARGUMENTS}")
|
||||||
endif()
|
endif()
|
||||||
@@ -38,9 +37,6 @@ function(RustAddLibrary lib_name)
|
|||||||
if("${RUST_BUILD_DIR}" STREQUAL "")
|
if("${RUST_BUILD_DIR}" STREQUAL "")
|
||||||
set(RUST_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
set(RUST_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
endif()
|
endif()
|
||||||
if("${RUST_TARGET}" STREQUAL "")
|
|
||||||
set(RUST_TARGET "riscv32imac-unknown-none-elf")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("${RELEASE}")
|
if("${RELEASE}")
|
||||||
set(CARGO_RELEASE "--release")
|
set(CARGO_RELEASE "--release")
|
||||||
|
@@ -3,6 +3,7 @@ set(CAMKES_APP "system" CACHE STRING "The one and only CAmkES application in thi
|
|||||||
set(CAPDL_LOADER_APP "kata-os-rootserver" CACHE STRING "")
|
set(CAPDL_LOADER_APP "kata-os-rootserver" CACHE STRING "")
|
||||||
|
|
||||||
set(PLATFORM "sparrow" CACHE STRING "The one and only seL4 platform for Sparrow")
|
set(PLATFORM "sparrow" CACHE STRING "The one and only seL4 platform for Sparrow")
|
||||||
|
set(RUST_TARGET "riscv32imac-unknown-none-elf" CACHE STRING "Rust target_arch")
|
||||||
set(KernelSel4Arch "riscv32" CACHE STRING "Specifies 32-bit branch of the seL4 spike platform")
|
set(KernelSel4Arch "riscv32" CACHE STRING "Specifies 32-bit branch of the seL4 spike platform")
|
||||||
set(KernelIsMCS ON CACHE BOOL "Enable seL4 MCS support")
|
set(KernelIsMCS ON CACHE BOOL "Enable seL4 MCS support")
|
||||||
set(KernelPrinting ON CACHE BOOL "Enable seL4 console output support")
|
set(KernelPrinting ON CACHE BOOL "Enable seL4 console output support")
|
||||||
|
Reference in New Issue
Block a user