Skip to content
Snippets Groups Projects
recipe.sh 941 B
Newer Older
GIT=https://gitlab.redox-os.org/redox-os/rust.git
BRANCH=compile-redox
DEPENDS="gcc cargo"
Ian Douglas Scott's avatar
Ian Douglas Scott committed

function recipe_version {
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    skip=1
}

function recipe_update {
    echo "skipping update"
    skip=1
}

function recipe_build {
    unset AR AS CC CXX LD NM OBJCOPY OBJDUMP RANLIB READELF STRIP
    python x.py dist --config ../config.toml --jobs $(nproc) --incremental --keep-stage 0
Ian Douglas Scott's avatar
Ian Douglas Scott committed
    skip=1
}

function recipe_test {
    echo "skipping test"
    skip=1
}

function recipe_clean {
    make clean
    skip=1
}

function recipe_stage {
    binpath="$1/bin"
    libpath="$1/lib/rustlib/${TARGET}/lib"
Ian Douglas Scott's avatar
Ian Douglas Scott committed
    mkdir -p "$binpath" "$libpath"
    cp -fv "build/${TARGET}/stage2/bin/rustc" "$binpath"
    cp -fv $(find build/${TARGET}/stage2/lib/rustlib/${TARGET}/lib/ -type f | grep -v librustc) "$libpath"
Ian Douglas Scott's avatar
Ian Douglas Scott committed
    skip=1
}