Skip to content

Commit 35e3371

Browse files
authored
Merge pull request #28960 from compnerd/static-dispatch
build: simplify handling for static variants (NFC)
2 parents 74cfee1 + ca1bb6f commit 35e3371

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
@@ -1404,18 +1404,7 @@ for host in "${ALL_HOSTS[@]}"; do
14041404
fi
14051405

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

14201409
unset skip_build
14211410
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)