redox/recipes/bootstrap/recipe.toml
2022-08-19 10:05:54 -06:00

24 lines
697 B
TOML

[source]
git = "https://gitlab.redox-os.org/redox-os/bootstrap.git"
[build]
template = "custom"
script = """
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
cargo \
-Zbuild-std=core,alloc,compiler_builtins \
-Zbuild-std-features=compiler-builtins-mem rustc \
--target "${TARGET}" \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
--release \
--target-dir "${COOKBOOK_BUILD}" \
-- \
--emit link="${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a"
mkdir -v "${COOKBOOK_STAGE}/boot"
"${TARGET}-ld" \
-o "${COOKBOOK_STAGE}/boot/bootstrap" \
--gc-sections \
-T "${COOKBOOK_SOURCE}/src/${ARCH}.ld" \
"${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a"
"""