| # Copyright lowRISC contributors. |
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| # SPDX-License-Identifier: Apache-2.0 |
| # build_tock.sh is a wrapper to invoke Cargo from Meson. This is a workaround |
| # solution to read the rust-toolchain file from the Tock repository and set the |
| # RUSTFLAGS environment variable. |
| export MESON_SOURCE_ROOT="${6}" |
| export MESON_BUILD_ROOT="${7}" |
| if [[ "${MODE}" == "release" ]]; then |
| cargo +"$(cat ${TOOLCHAIN_FILE})" build \ |
| --manifest-path "${MANIFEST_PATH}" \ |
| --target-dir "${TARGET_DIR}" \ |
| --features="${TOCK_FEATURES}" \ |