Skip to content

Commit 841f36b

Browse files
committed
Use libcxx from Darwin SDKs when building LLVM and Swift
We don't need to copy them anymore from the toolchain Addresses rdar://102387542
1 parent 1299d15 commit 841f36b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

utils/build-script-impl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,12 +2821,10 @@ for host in "${ALL_HOSTS[@]}"; do
28212821
# place during the cmake step of LLVM's build when libcxx is in
28222822
# tree... but we are not building llvm with libcxx in tree when we build
28232823
# swift. So we need to do configure's work here.
2824-
if [[ "${product}" == "llvm" ]]; then
2825-
# Find the location of the c++ header dir.
2826-
if [[ "$(uname -s)" == "Darwin" ]] ; then
2827-
HOST_CXX_DIR=$(dirname "${HOST_CXX}")
2828-
HOST_CXX_HEADERS_DIR="$HOST_CXX_DIR/../../usr/include/c++"
2829-
elif [[ "$(uname -s)" == "Haiku" ]] ; then
2824+
# We don't need this for Darwin since libcxx is present in the SDKs already,
2825+
# and clang knows how to find it there
2826+
if [[ "${product}" == "llvm" && "$(uname -s)" != "Darwin" ]]; then
2827+
if [[ "$(uname -s)" == "Haiku" ]] ; then
28302828
HOST_CXX_HEADERS_DIR="/boot/system/develop/headers/c++"
28312829
elif [[ "${ANDROID_DATA}" ]] ; then
28322830
# This means we're building natively on Android in the Termux

0 commit comments

Comments
 (0)