Fixes for installing rust package

This commit is contained in:
Jeremy Soller 2021-05-10 09:44:46 -06:00
parent 103c51c3c9
commit 59779a5793
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
2 changed files with 7 additions and 6 deletions

View File

@ -9,6 +9,9 @@ submodules = false
tools = ["src"]
verbose = 1
[install]
prefix = "install"
[rust]
backtrace = false
rpath = false

View File

@ -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
}