From 59779a5793ee8bf219801a1f2f201123a5c6a9eb Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 10 May 2021 09:44:46 -0600 Subject: [PATCH] Fixes for installing rust package --- recipes/rust/config.toml | 3 +++ recipes/rust/recipe.sh | 10 ++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/recipes/rust/config.toml b/recipes/rust/config.toml index 2305ee07e..45578d350 100644 --- a/recipes/rust/config.toml +++ b/recipes/rust/config.toml @@ -9,6 +9,9 @@ submodules = false tools = ["src"] verbose = 1 +[install] +prefix = "install" + [rust] backtrace = false rpath = false diff --git a/recipes/rust/recipe.sh b/recipes/rust/recipe.sh index 6cfd51386..7cd2424ee 100644 --- a/recipes/rust/recipe.sh +++ b/recipes/rust/recipe.sh @@ -18,7 +18,7 @@ function recipe_build { config="$(realpath ../config.toml)" source="$(realpath ../source)" unset AR AS CC CXX LD NM OBJCOPY OBJDUMP RANLIB READELF STRIP - python3 "$source/x.py" dist --config "$config" --jobs $(nproc) --incremental + python3 "$source/x.py" install --config "$config" --jobs $(nproc) --incremental skip=1 } @@ -33,10 +33,8 @@ function recipe_clean { } function recipe_stage { - binpath="$1/bin" - libpath="$1/lib" - cp -frv "build/${TARGET}/stage2/bin" "$binpath" - cp -frv "build/${TARGET}/stage2/lib" "$libpath" - ${STRIP} "$binpath/"* + rsync -av --delete "install/" "$1/" + # Cannot use STRIP because it is unset in recipe_build + "${HOST}-strip" -v "$1/bin/"{rustc,rustdoc} skip=1 }