Skip to content

Commit 33c1541

Browse files
committed
Merge pull request #1955 from apple/revert-1928-cleanup
Revert "Build the Swift runtime using the locally built clang compliler."
2 parents e7debad + 0c1a8f3 commit 33c1541

File tree

3 files changed

+2
-28
lines changed

3 files changed

+2
-28
lines changed

stdlib/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
# Create convenience targets for the Swift standard library.
2-
3-
set(CMAKE_CXX_COMPILER "${SWIFT_NATIVE_LLVM_TOOLS_PATH}/clang++")
4-
set(CMAKE_C_COMPILER "${SWIFT_NATIVE_LLVM_TOOLS_PATH}/clang")
5-
62
add_custom_target(swift-stdlib-all)
73
foreach(SDK ${SWIFT_SDKS})
84
add_custom_target("swift-stdlib-${SWIFT_SDK_${SDK}_LIB_SUBDIR}")

stdlib/public/stubs/Stubs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ extern "C" long double _swift_fmodl(long double lhs, long double rhs) {
258258
// This implementation is copied here to avoid a new dependency
259259
// on compiler-rt on Linux.
260260
// FIXME: rdar://14883575 Libcompiler_rt omits muloti4
261-
#if (defined(__linux__) && defined(__x86_64__)) || \
261+
#if (defined(__APPLE__) && defined(__arm64__)) || \
262+
(defined(__linux__) && defined(__x86_64__)) || \
262263
(defined(__linux__) && defined(__aarch64__)) || \
263264
(defined(__linux__) && defined(__powerpc64__))
264265

utils/build-script-impl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,28 +2065,6 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
20652065
${DISTCC_PUMP} "${CMAKE}" --build "${build_dir}" $(cmake_config_opt ${product}) -- ${BUILD_ARGS} ${build_targets[@]}
20662066
{ set +x; } 2>/dev/null
20672067
fi
2068-
2069-
# When we are building LLVM create symlinks to the c++ headers.
2070-
if [[ "${product}" == "llvm" ]]; then
2071-
set -x
2072-
2073-
# Find the location of the c++ header dir.
2074-
if [[ "$(uname -s)" == "Darwin" ]] ; then
2075-
HOST_CXX_DIR=$(dirname ${HOST_CXX})
2076-
HOST_CXX_HEADERS_DIR="$HOST_CXX_DIR/../../usr/include/c++"
2077-
else # Linux
2078-
HOST_CXX_HEADERS_DIR="/usr/include/c++"
2079-
fi
2080-
2081-
# Find the path in which the local clang build is expecting to find
2082-
# the c++ header files.
2083-
BUILT_CXX_INCLUDE_DIR="$llvm_build_dir/include"
2084-
2085-
echo "symlinking the system headers ($HOST_CXX_HEADERS_DIR) into the local clang build directory ($BUILT_CXX_INCLUDE_DIR)."
2086-
ln -s -f "$HOST_CXX_HEADERS_DIR" "$BUILT_CXX_INCLUDE_DIR"
2087-
2088-
{ set +x; } 2>/dev/null
2089-
fi
20902068
done
20912069
done
20922070
# END OF BUILD PHASE
@@ -2590,4 +2568,3 @@ if [[ "${INSTALLABLE_PACKAGE}" ]] ; then
25902568
{ set +x; } 2>/dev/null
25912569
fi
25922570
fi
2593-

0 commit comments

Comments
 (0)