[PATCH] D35418: Handle clang-tools-extra project in docker scripts.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 01:31:16 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL308594: Handle clang-tools-extra project in docker scripts. (authored by ibiryukov).
Changed prior to commit:
https://reviews.llvm.org/D35418?vs=107459&id=107462#toc
Repository:
rL LLVM
https://reviews.llvm.org/D35418
Files:
llvm/trunk/utils/docker/scripts/build_install_llvm.sh
Index: llvm/trunk/utils/docker/scripts/build_install_llvm.sh
===================================================================
--- llvm/trunk/utils/docker/scripts/build_install_llvm.sh
+++ llvm/trunk/utils/docker/scripts/build_install_llvm.sh
@@ -48,6 +48,7 @@
# We always checkout llvm
LLVM_PROJECTS="llvm"
CMAKE_LLVM_ENABLE_PROJECTS=""
+CLANG_TOOLS_EXTRA_ENABLED=0
function contains_project() {
local TARGET_PROJ="$1"
@@ -60,6 +61,17 @@
return 1
}
+function append_project() {
+ local PROJ="$1"
+
+ LLVM_PROJECTS="$LLVM_PROJECTS $PROJ"
+ if [ "$CMAKE_LLVM_ENABLE_PROJECTS" != "" ]; then
+ CMAKE_LLVM_ENABLE_PROJECTS="$CMAKE_LLVM_ENABLE_PROJECTS;$PROJ"
+ else
+ CMAKE_LLVM_ENABLE_PROJECTS="$PROJ"
+ fi
+}
+
while [[ $# -gt 0 ]]; do
case "$1" in
-r|--revision)
@@ -75,19 +87,27 @@
-p|--llvm-project)
shift
PROJ="$1"
+ shift
+
if [ "$PROJ" == "cfe" ]; then
PROJ="clang"
fi
- if ! contains_project "$PROJ" ; then
- LLVM_PROJECTS="$LLVM_PROJECTS $PROJ"
- if [ "$CMAKE_LLVM_ENABLE_PROJECTS" != "" ]; then
- CMAKE_LLVM_ENABLE_PROJECTS="$CMAKE_LLVM_ENABLE_PROJECTS;"
+
+ if [ "$PROJ" == "clang-tools-extra" ]; then
+ if [ $CLANG_TOOLS_EXTRA_ENABLED -ne 0 ]; then
+ echo "Project 'clang-tools-extra' is already enabled, ignoring extra occurences."
+ else
+ CLANG_TOOLS_EXTRA_ENABLED=1
fi
- CMAKE_LLVM_ENABLE_PROJECTS="$CMAKE_LLVM_ENABLED_PROJECTS$PROJ"
+
+ continue
+ fi
+
+ if ! contains_project "$PROJ" ; then
+ append_project "$PROJ"
else
echo "Project '$PROJ' is already enabled, ignoring extra occurences."
fi
- shift
;;
-i|--install-target)
shift
@@ -114,6 +134,15 @@
exit 1
fi
+if [ $CLANG_TOOLS_EXTRA_ENABLED -ne 0 ]; then
+ if ! contains_project "clang"; then
+ echo "Project 'clang-tools-extra' was enabled without 'clang'."
+ echo "Adding 'clang' to a list of projects."
+
+ append_project "clang"
+ fi
+fi
+
if [ "$LLVM_BRANCH" == "" ]; then
LLVM_BRANCH="trunk"
fi
@@ -148,6 +177,16 @@
"$CLANG_BUILD_DIR/src/$LLVM_PROJECT"
done
+if [ $CLANG_TOOLS_EXTRA_ENABLED -ne 0 ]; then
+ echo "Checking out https://llvm.org/svn/llvm-project/clang-tools-extra to $CLANG_BUILD_DIR/src/clang/tools/extra"
+ # FIXME: --trust-server-cert is required to workaround 'SSL issuer is not
+ # trusted' error. Using https seems preferable to http either way,
+ # albeit this is not secure.
+ svn co -q $SVN_REV_ARG --trust-server-cert \
+ "https://llvm.org/svn/llvm-project/clang-tools-extra/$LLVM_BRANCH" \
+ "$CLANG_BUILD_DIR/src/clang/tools/extra"
+fi
+
mkdir "$CLANG_BUILD_DIR/build"
pushd "$CLANG_BUILD_DIR/build"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35418.107462.patch
Type: text/x-patch
Size: 2796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170720/ac8be790/attachment.bin>
More information about the llvm-commits
mailing list