Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions apothecary/apothecary
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,20 @@ function frameworkFormula() {
echo "No PKL file found at $1 - $CURRENT_TYPE. Ensure .pkl files are present and correctly named."
fi

# archives built only for the paired arch (eg KleidiCV, arm64 only) aren't in this arch's
# folder, so they're never lipo'd; libtool merges them into that arch's slice of the merged archive
if [[ "$X_ARCH" != "$PAIR" && -d "$LIBS_DIR_REAL/$1/lib/$CURRENT_TYPE/$PAIR/" ]]; then
while IFS= read -r -d $'\0' PAIR_ONLY_FILE; do
if [[ ! -f "$DIR_PATH/$(basename "$PAIR_ONLY_FILE")" ]]; then
mkdir -p "$MERGED_DIR"
cp -v "$PAIR_ONLY_FILE" "$MERGED_DIR/"
echo "Only built for $PAIR: $PAIR_ONLY_FILE into [$MERGED_DIR]"
if [[ ! " ${merged_dirs[*]} " =~ " $MERGED_DIR/ " ]]; then
merged_dirs+=("$MERGED_DIR/")
fi
fi
done < <(find "$LIBS_DIR_REAL/$1/lib/$CURRENT_TYPE/$PAIR/" -maxdepth 1 -name "*.a" -print0)
fi
num_archive_paths=${#archive_paths[@]}
for ARCH_FILE in "${archive_paths[@]}"; do
echo "ARCH_FILE: $ARCH_FILE $1 - $CURRENT_TYPE"
Expand Down Expand Up @@ -2447,6 +2461,20 @@ function xframeworkFormula() {
echo "No PKL file found at $1 - $CURRENT_TYPE. Ensure .pkl files are present and correctly named."
# Handle error or provide defaults for VERSION and DEFINES
fi
# archives built only for the paired arch (eg KleidiCV, arm64 only) aren't in this arch's
# folder, so they're never lipo'd; libtool merges them into that arch's slice of the merged archive
if [[ "$X_ARCH" != "$PAIR" && -d "$LIBS_DIR_REAL/$1/lib/$CURRENT_TYPE/$PAIR/" ]]; then
while IFS= read -r -d $'\0' PAIR_ONLY_FILE; do
if [[ ! -f "$DIR_PATH/$(basename "$PAIR_ONLY_FILE")" ]]; then
mkdir -p "$MERGED_DIR"
cp -v "$PAIR_ONLY_FILE" "$MERGED_DIR/"
echo "Only built for $PAIR: $PAIR_ONLY_FILE into [$MERGED_DIR]"
if [[ ! " ${merged_dirs[*]} " =~ " $MERGED_DIR/ " ]]; then
merged_dirs+=("$MERGED_DIR/")
fi
fi
done < <(find "$LIBS_DIR_REAL/$1/lib/$CURRENT_TYPE/$PAIR/" -maxdepth 1 -name "*.a" -print0)
fi
num_archive_paths=${#archive_paths[@]}
for ARCH_FILE in "${archive_paths[@]}"; do
echo "ARCH_FILE: $ARCH_FILE $1 - $CURRENT_TYPE"
Expand Down
Loading