Skip to content

Commit

Permalink
do.sh build now skips non-program crates
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jul 31, 2020
1 parent a6278bd commit 0bf953f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ perform_action() {
targetDir="$projectDir"/target
case "$1" in
build)
"$sdkDir"/rust/build.sh "$projectDir"
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"
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)
(
Expand Down

0 comments on commit 0bf953f

Please sign in to comment.