do.sh build now skips non-program crates

This commit is contained in:
Michael Vines 2020-07-31 11:58:26 -07:00
parent a6278bd58d
commit 0bf953fc4c
1 changed files with 9 additions and 5 deletions

4
do.sh
View File

@ -31,12 +31,16 @@ perform_action() {
targetDir="$projectDir"/target
case "$1" in
build)
if [[ -f "$projectDir"/Xargo.toml ]]; then
"$sdkDir"/rust/build.sh "$projectDir"
so_path="$targetDir/$profile"
so_name="spl_${2//\-/_}"
cp "$so_path/${so_name}.so" "$so_path/${so_name}_debug.so"
"$sdkDir"/dependencies/llvm-native/bin/llvm-objcopy --strip-all "$so_path/${so_name}.so" "$so_path/$so_name.so"
else
echo "$projectDir does not contain a program, skipping"
fi
;;
build-native)
(