diff --git a/recipes/rust/config.toml b/recipes/rust/config.toml index 2305ee07eb753f32c294406a281931a5213869c1..45578d35031fbe23263917cbbe6c32dec0117c31 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 6cfd51386aa34f0e65142d0f35b945ed911a5606..7cd2424ee41c82480fc81a2f2aa57283eeb83605 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 }