Skip to content

Commit a596172

Browse files
authored
Merge pull request #28296 from xiaobai/mono-for-all-and-all-for-mono
[build] Refer to projects through the monorepo directly
2 parents 2526e79 + 2978884 commit a596172

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

utils/build-script-impl

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,9 @@ function should_build_stdlib_target() {
11661166
#
11671167
NINJA_SOURCE_DIR="${WORKSPACE}/ninja"
11681168
SWIFT_SOURCE_DIR="${WORKSPACE}/swift"
1169-
LLVM_SOURCE_DIR="${WORKSPACE}/llvm"
1169+
LLVM_SOURCE_DIR="${WORKSPACE}/llvm-project/llvm"
11701170
CMARK_SOURCE_DIR="${WORKSPACE}/cmark"
1171-
LLDB_SOURCE_DIR="${WORKSPACE}/lldb"
1171+
LLDB_SOURCE_DIR="${WORKSPACE}/llvm-project/lldb"
11721172
LLBUILD_SOURCE_DIR="${WORKSPACE}/llbuild"
11731173
STRESSTEST_PACKAGE_DIR="${WORKSPACE}/swift-stress-tester"
11741174
XCTEST_SOURCE_DIR="${WORKSPACE}/swift-corelibs-xctest"
@@ -1177,7 +1177,7 @@ FOUNDATION_STATIC_SOURCE_DIR="${WORKSPACE}/swift-corelibs-foundation"
11771177
LIBDISPATCH_SOURCE_DIR="${WORKSPACE}/swift-corelibs-libdispatch"
11781178
LIBDISPATCH_STATIC_SOURCE_DIR="${WORKSPACE}/swift-corelibs-libdispatch"
11791179
LIBICU_SOURCE_DIR="${WORKSPACE}/icu"
1180-
LIBCXX_SOURCE_DIR="${WORKSPACE}/libcxx"
1180+
LIBCXX_SOURCE_DIR="${WORKSPACE}/llvm-project/libcxx"
11811181
PLAYGROUNDSUPPORT_SOURCE_DIR="${WORKSPACE}/swift-xcode-playground-support"
11821182

11831183
if [[ ! "${SKIP_BUILD_PLAYGROUNDSUPPORT}" && ! -d ${PLAYGROUNDSUPPORT_SOURCE_DIR} ]]; then
@@ -1187,29 +1187,18 @@ fi
11871187

11881188
# Symlink clang into the llvm tree.
11891189
CLANG_SOURCE_DIR="${LLVM_SOURCE_DIR}/tools/clang"
1190-
if [ ! -e "${WORKSPACE}/clang" ] ; then
1191-
# If llvm/tools/clang is already a directory, use that and skip the symlink.
1192-
if [ ! -d "${CLANG_SOURCE_DIR}" ] ; then
1193-
echo "Can't find source directory for clang (tried ${WORKSPACE}/clang and ${CLANG_SOURCE_DIR})"
1194-
exit 1
1195-
fi
1196-
fi
11971190
if [ ! -d "${CLANG_SOURCE_DIR}" ] ; then
1198-
make_relative_symlink "${WORKSPACE}/clang" "${CLANG_SOURCE_DIR}"
1191+
make_relative_symlink "${WORKSPACE}/llvm-project/clang" "${CLANG_SOURCE_DIR}"
11991192
fi
12001193

12011194
# Don't symlink clang-tools-extra into the tree as the 'clang' symlink prevents
12021195
# make_relative_symlink from working correctly.
1203-
if [ -e "${WORKSPACE}/clang-tools-extra" ] ; then
1204-
CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKSPACE}/clang-tools-extra"
1205-
fi
1196+
CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKSPACE}/llvm-project/clang-tools-extra"
12061197

12071198
# Symlink compiler-rt into the llvm tree, if it exists.
12081199
COMPILER_RT_SOURCE_DIR="${LLVM_SOURCE_DIR}/projects/compiler-rt"
1209-
if [ -e "${WORKSPACE}/compiler-rt" ] ; then
1210-
if [ ! -d "${COMPILER_RT_SOURCE_DIR}" ] ; then
1211-
make_relative_symlink "${WORKSPACE}/compiler-rt" "${COMPILER_RT_SOURCE_DIR}"
1212-
fi
1200+
if [ ! -d "${COMPILER_RT_SOURCE_DIR}" ] ; then
1201+
make_relative_symlink "${WORKSPACE}/llvm-project/compiler-rt" "${COMPILER_RT_SOURCE_DIR}"
12131202
fi
12141203

12151204
PRODUCTS=(cmark llvm)
@@ -1930,11 +1919,9 @@ for host in "${ALL_HOSTS[@]}"; do
19301919
-DLLVM_TOOL_LLD_BUILD:BOOL=TRUE
19311920
)
19321921

1933-
if [[ ! -z "${CLANG_TOOLS_EXTRA_SOURCE_DIR}" ]] ; then
1934-
cmake_options+=(
1935-
-DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${CLANG_TOOLS_EXTRA_SOURCE_DIR}"
1936-
)
1937-
fi
1922+
cmake_options+=(
1923+
-DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${CLANG_TOOLS_EXTRA_SOURCE_DIR}"
1924+
)
19381925

19391926
if [[ "${BUILD_TOOLCHAIN_ONLY}" ]]; then
19401927
cmake_options+=(

0 commit comments

Comments
 (0)