Skip to content

Commit 6e6de9e

Browse files
committed
[build-script] Pass LLDB_EXTRA_CMAKE_ARGS last
Pass LLDB_EXTRA_CMAKE_ARGS last so it can override defaults values set earlier. It also makes sure we only pass LLDB_USE_SYSTEM_DEBUGSERVER when the corresponding build-script flag is set.
1 parent 2585d6c commit 6e6de9e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

utils/build-script-impl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,13 +2439,6 @@ for host in "${ALL_HOSTS[@]}"; do
24392439
"${lldb_cmake_options[@]}"
24402440
)
24412441

2442-
if [ ! -z "${LLDB_EXTRA_CMAKE_ARGS}" ]; then
2443-
cmake_options=(
2444-
"${cmake_options[@]}"
2445-
${LLDB_EXTRA_CMAKE_ARGS}
2446-
)
2447-
fi
2448-
24492442
# Figure out if we think this is a buildbot build.
24502443
# This will influence the lldb version line.
24512444
if [ ! -z "${JENKINS_HOME}" -a ! -z "${JOB_NAME}" -a ! -z "${BUILD_NUMBER}" ]; then
@@ -2518,11 +2511,20 @@ for host in "${ALL_HOSTS[@]}"; do
25182511
-DLLDB_TEST_USER_ARGS="${DOTEST_ARGS}"
25192512
)
25202513

2521-
if [[ "$(uname -s)" == "Darwin" ]] ; then
2514+
if [[ "$(uname -s)" == "Darwin" && "$(true_false ${LLDB_USE_SYSTEM_DEBUGSERVER})" == "TRUE" ]]; then
25222515
cmake_options+=(
25232516
-DLLDB_USE_SYSTEM_DEBUGSERVER:BOOL="${LLDB_USE_SYSTEM_DEBUGSERVER}"
25242517
)
25252518
fi
2519+
2520+
# Add the extra CMake args at the end so they can override
2521+
# values set earlier.
2522+
if [ ! -z "${LLDB_EXTRA_CMAKE_ARGS}" ]; then
2523+
cmake_options=(
2524+
"${cmake_options[@]}"
2525+
${LLDB_EXTRA_CMAKE_ARGS}
2526+
)
2527+
fi
25262528
;;
25272529
llbuild)
25282530
cmake_options=(

0 commit comments

Comments
 (0)