Skip to content

Commit ca1bb6f

Browse files
committed
build: simplify handling for static variants (NFC)
There is no need to special case the products for the static build. This handles `libdispatch_static` and `foundation_static` more generically.
1 parent 4356e95 commit ca1bb6f

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

utils/build-script-impl

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,18 +1400,7 @@ for host in "${ALL_HOSTS[@]}"; do
14001400
fi
14011401

14021402
for product in "${PRODUCTS[@]}"; do
1403-
# Check if we should perform this action.
1404-
tmp_product=${product}
1405-
if [[ ${tmp_product} == "libdispatch_static" ]]; then
1406-
tmp_product=libdispatch
1407-
LIBDISPATCH_STATIC_CMAKE_OPTIONS=${LIBDISPATCH_CMAKE_OPTIONS[@]}
1408-
fi
1409-
if [[ ${tmp_product} == "foundation_static" ]]; then
1410-
tmp_product=foundation
1411-
fi
1412-
if ! [[ $(should_execute_action "${host}-${tmp_product}-build") ]]; then
1413-
continue
1414-
fi
1403+
[[ $(should_execute_action "${host}-${product/_static}-build") ]] || continue
14151404

14161405
unset skip_build
14171406
source_dir_var="$(toupper ${product})_SOURCE_DIR"
@@ -2627,17 +2616,7 @@ for host in "${ALL_HOSTS[@]}"; do
26272616
set_build_options_for_host $host
26282617

26292618
for product in "${PRODUCTS[@]}"; do
2630-
# Check if we should perform this action.
2631-
tmp_product=${product}
2632-
if [[ ${tmp_product} == "libdispatch_static" ]]; then
2633-
tmp_product=libdispatch
2634-
fi
2635-
if [[ ${tmp_product} == "foundation_static" ]]; then
2636-
tmp_product=foundation
2637-
fi
2638-
if ! [[ $(should_execute_action "${host}-${tmp_product}-install") ]]; then
2639-
continue
2640-
fi
2619+
[[ $(should_execute_action "${host}-${product/_static}-install") ]] || continue
26412620
if [[ -z "${INSTALL_DESTDIR}" ]] ; then
26422621
echo "--install-destdir is required to install products."
26432622
exit 1

0 commit comments

Comments
 (0)