Skip to content

Commit

Permalink
Advances to llvm packaging:
Browse files Browse the repository at this point in the history
 - now building sanitized libc++ (asan, msan, and tsan)
 - now building libc++/c++abi on all platforms
  - still not installing libc++ on osx (to avoid conflicts with system)
 - now ensuring we build using mason clang++
 - upgraded build dependencies
 - added support for building lldb against libedit and libncurses
 - simplify and robustify package installs (no longer by default building iwyu)
 - no longer installing install-xcode-toolchain
  • Loading branch information
Dane Springmeyer committed Feb 4, 2018
1 parent afaaa7c commit 30c4647
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 122 deletions.
14 changes: 0 additions & 14 deletions scripts/llvm/3.8.1-libstdcxx/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,4 @@ export MASON_BASE_VERSION=${MASON_VERSION/-libstdcxx/}
# inherit all functions from llvm base
source ${HERE}/../../${MASON_NAME}/base/common.sh

function setup_release() {
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/llvm-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/ 6de84b7bb71e49ef2764d364c4318e01fda1e1e3
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/cfe-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang 9a05f9c1c8dc865c064782dedbbbfb533c3909ac
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/compiler-rt-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt 678cbff6e177a18f4e2d0662901a744163da3347
if [[ ${BUILD_AND_LINK_LIBCXX} == true ]]; then
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libcxx-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx d15220e86eb8480e58a4378a4c977bbb5463fb79
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libcxxabi-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi b7508c64ab8e670062ee57a12ae1e542bcb2bfb4
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libunwind-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind 90c0184ca72e1999fec304f76bfa10340f038ee5
fi
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/lld-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld 416c36ded12ead42dc4739d52eabf22267300883
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/clang-tools-extra-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra ea40e36d54dc8c9bb21cbebcc872a3221a2ed685
get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/lldb-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb c8c38fa9ab92f9021067678f1a1c8f07ea75ac93
}

mason_run "$@"
9 changes: 0 additions & 9 deletions scripts/llvm/3.8.1/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ MASON_VERSION=$(basename $HERE)
source ${HERE}/../../${MASON_NAME}/base/common.sh

function setup_release() {
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/llvm-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/ 6de84b7bb71e49ef2764d364c4318e01fda1e1e3
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/cfe-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang 9a05f9c1c8dc865c064782dedbbbfb533c3909ac
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/compiler-rt-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt 678cbff6e177a18f4e2d0662901a744163da3347
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxx-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx d15220e86eb8480e58a4378a4c977bbb5463fb79
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxxabi-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi b7508c64ab8e670062ee57a12ae1e542bcb2bfb4
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libunwind-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind 90c0184ca72e1999fec304f76bfa10340f038ee5
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lld-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld 416c36ded12ead42dc4739d52eabf22267300883
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/clang-tools-extra-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra ea40e36d54dc8c9bb21cbebcc872a3221a2ed685
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lldb-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb c8c38fa9ab92f9021067678f1a1c8f07ea75ac93
get_llvm_project "https://github.com/include-what-you-use/include-what-you-use/archive/clang_${MAJOR_MINOR}.tar.gz" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use 2b5c5be3c7dcbe555a481083363408399b40e0c8
}

Expand Down
11 changes: 0 additions & 11 deletions scripts/llvm/3.9.1/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@ MASON_VERSION=$(basename $HERE)
source ${HERE}/../../${MASON_NAME}/base/common.sh

function setup_release() {
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/llvm-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/ 282e47884738e362ff4dc70910d2e08c242f161a
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/cfe-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang 211b70f3cc75ef318dfa4efd57a2e9c547375f94
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/compiler-rt-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt 19981bad5a444b36b2834d5bfd3edd5c66c7ca22
if [[ ${BUILD_AND_LINK_LIBCXX} == true ]]; then
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxx-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx 2fdaf6017fe742974eb06f9529321a915e84a034
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxxabi-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi 277446b2957d2a82ef10d173b3882b64d68ca5d0
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libunwind-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind 0df57c982fda5ba8b97698525ed6fea09f87ea15
fi
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lld-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld 6c8018e5caf82f1f771d24b532af11c67228f333
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/clang-tools-extra-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra a3f5d99cd3d4ccdfc6d4dba15db616d53a654c3f
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lldb-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb c8e35a599bd366d1fc122526d3b7a1902890d1ed
get_llvm_project "https://github.com/include-what-you-use/include-what-you-use/archive/clang_${MAJOR_MINOR}.tar.gz" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use 7e5c73ce1a2fdd1ffd29fad1ae2628d0134368c6
}

Expand Down
14 changes: 1 addition & 13 deletions scripts/llvm/4.0.0/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,7 @@ MASON_VERSION=$(basename $HERE)
source ${HERE}/../../${MASON_NAME}/base/common.sh

function setup_release() {
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/llvm-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/ c872366ec69fb425ce9336741dba04d9adf16c3e
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/cfe-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang 61ca17979e0c2ec7dc5f66cb54ac0b8ec0e653a9
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/compiler-rt-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt bbf0ad69a296548a44019ed953bdfffc3d3f95d5
if [[ ${BUILD_AND_LINK_LIBCXX} == true ]]; then
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxx-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx ab37f78c83c739d862099a874ad91c3ab295f6b7
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxxabi-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi d36cb0be6c8fa54534a1cb067bdb4a6b3389d3d3
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libunwind-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind 5178ea6b1834a7cd3d6be610709b811255255a11
fi
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lld-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld 137e8c9d5d73a0e3dfec1ffd63abb5173473e95b
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/clang-tools-extra-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra 9c9ad20062c41f22f4078dcfea38daebfce2c2ed
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lldb-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb 5b17f041631670e40718ab89f99f1c8347766d92
#get_llvm_project "https://github.com/include-what-you-use/include-what-you-use/archive/clang_${MAJOR_MINOR}.tar.gz" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use
get_llvm_project "https://github.com/include-what-you-use/include-what-you-use.git" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use
get_llvm_project "https://github.com/include-what-you-use/include-what-you-use/archive/clang_${MAJOR_MINOR}.tar.gz" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use
}

mason_run "$@"
15 changes: 0 additions & 15 deletions scripts/llvm/4.0.1/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,7 @@ MASON_VERSION=$(basename $HERE)
source ${HERE}/../../${MASON_NAME}/base/common.sh

function setup_release() {
# usage: get_llvm_project [url or git url] [path to download to] <optional hash of download> <optional gitsha to pin to>
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/llvm-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/cfe-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/compiler-rt-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt
if [[ ${BUILD_AND_LINK_LIBCXX} == true ]]; then
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxx-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxxabi-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libunwind-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind
fi
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lld-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/clang-tools-extra-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lldb-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb
get_llvm_project "https://github.com/include-what-you-use/include-what-you-use/archive/clang_${MAJOR_MINOR}.tar.gz" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use
# Note: the below commented line uses a custom gitsha to pin to a working commit if the include-what-you-use team has not yet created a tag for the given clang major version
# This happended previously a https://github.com/include-what-you-use/include-what-you-use/issues/397#issuecomment-313479507
#get_llvm_project "https://github.com/include-what-you-use/include-what-you-use.git" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use "" 45e1264507f5e2725289ca3a0f4de98108e964c7
}

mason_run "$@"
23 changes: 5 additions & 18 deletions scripts/llvm/5.0.0/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,10 @@ MASON_VERSION=$(basename $HERE)
# inherit all functions from llvm base
source ${HERE}/../../${MASON_NAME}/base/common.sh

function setup_release() {
# usage: get_llvm_project [url or git url] [path to download to] <optional hash of download> <optional gitsha to pin to>
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/llvm-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/cfe-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/compiler-rt-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt
if [[ ${BUILD_AND_LINK_LIBCXX} == true ]]; then
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxx-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxxabi-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libunwind-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind
fi
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lld-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/clang-tools-extra-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra
get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lldb-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb
#get_llvm_project "https://github.com/include-what-you-use/include-what-you-use/archive/clang_${MAJOR_MINOR}.tar.gz" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use
# Note: the below commented line uses a custom gitsha to pin to a working commit if the include-what-you-use team has not yet created a tag for the given clang major version
# This happended previously a https://github.com/include-what-you-use/include-what-you-use/issues/397#issuecomment-313479507
#get_llvm_project "https://github.com/include-what-you-use/include-what-you-use.git" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use "" 45e1264507f5e2725289ca3a0f4de98108e964c7
}
# broken with:
# ../tools/clang/tools/include-what-you-use/iwyu_ast_util.cc:455:3: error: use of undeclared identifier 'printTemplateArgumentList'
# function setup_release() {
# get_llvm_project "https://github.com/include-what-you-use/include-what-you-use.git" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use "" 5788b34c2e22fa97630c4a5b1153d828698f9ac1
# }

mason_run "$@"
Loading

0 comments on commit 30c4647

Please sign in to comment.