From 1eddf2d847d609df991859625571e2abf96fe580 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Thu, 23 Jan 2020 15:29:24 +0000 Subject: Add patch support for libcxx Building older LLVM/libcxx versions under Ubuntu 18.04 requirer patches --- scripts/build/p-libcxx.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts/build/p-libcxx.inc') diff --git a/scripts/build/p-libcxx.inc b/scripts/build/p-libcxx.inc index 41ca4cc4..f803080a 100644 --- a/scripts/build/p-libcxx.inc +++ b/scripts/build/p-libcxx.inc @@ -17,7 +17,13 @@ download_libcxx() { git clone --single-branch --branch "${version}" --depth 1 "https://github.com/llvm/llvm-project.git" "${LIBCXX_SRC}" - + + # Apply existing patches if needed + if [ -f "${DIR}/patches/libcxx${LLVM_VERSION_SHORT}.patch" ]; then + cd "${LIBCXX_SRC}" || (echo "Directory does not exist"; exit 1) + patch -p1 --follow-symlinks -i "${DIR}/patches/libcxx${LLVM_VERSION_SHORT}.patch" || return 1 + fi + # Prepare LLVM subprojects for older LLVM versions cd "${LIBCXX_SRC}/llvm/projects" ln -s ../../libcxx . -- cgit 1.4.1