Fix create lib after move into costerrs project

This commit is contained in:
Piv
2023-02-03 21:32:47 +10:30
parent 734a19f711
commit f28dfe22d6

View File

@@ -41,10 +41,11 @@ fi
rust_target="${rust_arch}-${rust_platform}${rust_abi}" rust_target="${rust_arch}-${rust_platform}${rust_abi}"
# #
# Build library in debug or release # Build library in debug or release
build_args=(--manifest-path ../costerrs/Cargo.toml --target "${rust_target}") build_args=(--manifest-path ../Cargo.toml --target "${rust_target}")
if [[ "$CONFIGURATION" == "Release" ]]; then if [[ "$CONFIGURATION" == "Release" ]]; then
rust_config="release" rust_config="release"
env PATH="${build_path}" cargo build --release "${build_args[@]}" env PATH="${build_path}" cargo build --release "${build_args[@]}"
# Using release even for debug, as we can't build release without paying
elif [[ "$CONFIGURATION" == "Debug" ]]; then elif [[ "$CONFIGURATION" == "Debug" ]]; then
rust_config="release" rust_config="release"
env PATH="${build_path}" cargo build --release "${build_args[@]}" env PATH="${build_path}" cargo build --release "${build_args[@]}"
@@ -53,4 +54,4 @@ else
fi fi
# #
# Copy the built library to the derived files directory # Copy the built library to the derived files directory
cp -v "../costerrs/target/${rust_target}/${rust_config}/libcoster_rs.a" ${DERIVED_FILES_DIR} cp -v "../target/${rust_target}/${rust_config}/libcoster_rs.a" ${DERIVED_FILES_DIR}