Skip to content

Commit abd6eff

Browse files
authored
Fix Apple frameworks alway building both modes (#12510)
### Summary We currently always build both versions since the flags (--Release, --Debug) append instead of override. ### Test plan ``` $ ./scripts/build_apple_frameworks.sh → MODES=("Release" "Debug") $ ./scripts/build_apple_frameworks.sh --Release → MODES=("Release") $ ./scripts/build_apple_frameworks.sh --Debug → MODES=("Debug") $ ./scripts/build_apple_frameworks.sh --Release --Debug → MODES=("Release" "Debug") ``` cc @larryliu0820
1 parent 953fa0e commit abd6eff

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/build_apple_frameworks.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
set -euxo pipefail
99

10-
MODES=("Release" "Debug")
10+
MODES=()
1111
PRESETS=("ios" "ios-simulator" "macos")
1212
# To support backwards compatibility, we want to retain the same output directory.
1313
PRESETS_RELATIVE_OUT_DIR=("ios" "simulator" "macos")
@@ -137,6 +137,11 @@ for arg in "$@"; do
137137
esac
138138
done
139139

140+
# If no modes are specified, default to both Release and Debug
141+
if [[ ${#MODES[@]} -eq 0 ]]; then
142+
MODES=("Release" "Debug")
143+
fi
144+
140145
echo "Building libraries"
141146

142147
rm -rf "${OUTPUT_DIR}"

0 commit comments

Comments
 (0)