Skip to content

Commit 302b685

Browse files
committed
[gardening][build-script-impl] Use += with arrays.
Its cleaner than doing: array=( "${array[@]}" x y )
1 parent cf54434 commit 302b685

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

utils/build-script-impl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -528,15 +528,13 @@ function set_deployment_target_based_options() {
528528
)
529529
if [[ $(true_false "${LLVM_ENABLE_LTO}") = "TRUE" ]]; then
530530
if [[ $(cmake_needs_to_specify_standard_computed_defaults) = "TRUE" ]]; then
531-
llvm_cmake_options=(
532-
"${llvm_cmake_options[@]}"
531+
llvm_cmake_options+=(
533532
"-DCMAKE_C_STANDARD_COMPUTED_DEFAULT=AppleClang"
534533
"-DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT=AppleClang"
535534
)
536535
fi
537536

538-
llvm_cmake_options=(
539-
"${llvm_cmake_options[@]}"
537+
llvm_cmake_options+=(
540538
"-DCMAKE_C_FLAGS=-O2 -flto -gline-tables-only -fno-stack-protector "
541539
"-DCMAKE_CXX_FLAGS=-O2 -flto -gline-tables-only -fno-stack-protector "
542540
"-DCMAKE_C_FLAGS_RELWITHDEBINFO=-O2 -flto -gline-tables-only -fno-stack-protector "
@@ -547,8 +545,7 @@ function set_deployment_target_based_options() {
547545

548546
if [[ $(true_false "${SWIFT_ENABLE_LTO}") = "TRUE" ]]; then
549547
if [[ $(cmake_needs_to_specify_standard_computed_defaults) = "TRUE" ]]; then
550-
swift_cmake_options=(
551-
"${swift_cmake_options[@]}"
548+
swift_cmake_options+=(
552549
"-DCMAKE_C_STANDARD_COMPUTED_DEFAULT=AppleClang"
553550
"-DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT=AppleClang"
554551
)
@@ -558,8 +555,7 @@ function set_deployment_target_based_options() {
558555
)
559556
fi
560557

561-
swift_cmake_options=(
562-
"${swift_cmake_options[@]}"
558+
swift_cmake_options+=(
563559
-DSWIFT_DARWIN_DEPLOYMENT_VERSION_OSX="${DARWIN_DEPLOYMENT_VERSION_OSX}"
564560
-DSWIFT_DARWIN_DEPLOYMENT_VERSION_IOS="${DARWIN_DEPLOYMENT_VERSION_IOS}"
565561
-DSWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS="${DARWIN_DEPLOYMENT_VERSION_TVOS}"

0 commit comments

Comments
 (0)