do.sh build now skips non-program crates
This commit is contained in:
parent
a6278bd58d
commit
0bf953fc4c
4
do.sh
4
do.sh
|
@ -31,12 +31,16 @@ perform_action() {
|
||||||
targetDir="$projectDir"/target
|
targetDir="$projectDir"/target
|
||||||
case "$1" in
|
case "$1" in
|
||||||
build)
|
build)
|
||||||
|
if [[ -f "$projectDir"/Xargo.toml ]]; then
|
||||||
"$sdkDir"/rust/build.sh "$projectDir"
|
"$sdkDir"/rust/build.sh "$projectDir"
|
||||||
|
|
||||||
so_path="$targetDir/$profile"
|
so_path="$targetDir/$profile"
|
||||||
so_name="spl_${2//\-/_}"
|
so_name="spl_${2//\-/_}"
|
||||||
cp "$so_path/${so_name}.so" "$so_path/${so_name}_debug.so"
|
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"
|
"$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)
|
build-native)
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in New Issue