mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-25 00:17:38 +00:00
Merge remote-tracking branch 'origin/9' into snapshot
This commit is contained in:
commit
9571f92559
23
debian/README
vendored
23
debian/README
vendored
@ -9,7 +9,7 @@ The current snapshot release is maintained in the "snapshot" branch.
|
|||||||
The easiest way to get all branches is probably to have one
|
The easiest way to get all branches is probably to have one
|
||||||
clone per version:
|
clone per version:
|
||||||
|
|
||||||
for f in 7 8 9 snapshot; do
|
for f in 8 9 snapshot; do
|
||||||
git clone git@salsa.debian.org:pkg-llvm-team/llvm-toolchain.git -b $f $f
|
git clone git@salsa.debian.org:pkg-llvm-team/llvm-toolchain.git -b $f $f
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ Steps for manually building a snapshot release
|
|||||||
$ sh snapshot/debian/orig-tar.sh
|
$ sh snapshot/debian/orig-tar.sh
|
||||||
|
|
||||||
which will retrieve the latest version for each LLVM subproject (llvm,
|
which will retrieve the latest version for each LLVM subproject (llvm,
|
||||||
clang, lldb, etc.) from the main development (upstream SVN). and repack it
|
clang, lldb, etc.) from the main development (upstream github). and repack it
|
||||||
as a set of tarballs.
|
as a set of tarballs.
|
||||||
|
|
||||||
2) Unpack the original tarballs and apply quilt debian patches.
|
2) Unpack the original tarballs and apply quilt debian patches.
|
||||||
@ -33,8 +33,10 @@ Steps for manually building a snapshot release
|
|||||||
$ sh unpack.sh
|
$ sh unpack.sh
|
||||||
|
|
||||||
which will unpack the source tree inside a new directory such as
|
which will unpack the source tree inside a new directory such as
|
||||||
branches/llvm-toolchain-snapshot_3.10~svn26101042. Depending on the current
|
branches/llvm-toolchain-snapshot_3.9~+20191018225217+3b113a2be6d.
|
||||||
snapshot version number and svn release, the directory name will be
|
(date+hour+short git hash).
|
||||||
|
Depending on the current snapshot version number and git release,
|
||||||
|
the directory name will be
|
||||||
different.
|
different.
|
||||||
|
|
||||||
Quilt patches will then be applied.
|
Quilt patches will then be applied.
|
||||||
@ -52,22 +54,23 @@ Retrieving a specific branch or release candidate with orig-tar.sh
|
|||||||
When using orig-tar.sh, if you need to retrieve a specific branch, you can pass
|
When using orig-tar.sh, if you need to retrieve a specific branch, you can pass
|
||||||
the branch name as the first argument. For example, to get the 10 release
|
the branch name as the first argument. For example, to get the 10 release
|
||||||
branch at
|
branch at
|
||||||
http://llvm.org/svn/llvm-project/{llvm,...}/branches/release_100
|
https://github.com/llvm/llvm-project/branches
|
||||||
you should use,
|
you should use,
|
||||||
|
|
||||||
$ sh snapshot/debian/orig-tar.sh release_100
|
$ sh 9/debian/orig-tar.sh release/9.x
|
||||||
|
|
||||||
To retrieve a specific release candidate, you can pass the branch name as the
|
To retrieve a specific release candidate, you can pass the branch name as the
|
||||||
first argument, and the tag rc number as the second argument. For example, to
|
first argument, and the tag rc number as the second argument. For example, to
|
||||||
get the 10.0.1 release candidate rc3 at
|
get the 9.0.1 release candidate rc3 at
|
||||||
http://llvm.org/svn/llvm-project/{llvm,...}/tags/RELEASE_1001/rc3
|
https://github.com/llvm/llvm-project/tags
|
||||||
you should use,
|
you should use,
|
||||||
|
|
||||||
$ sh snapshot/debian/orig-tar.sh RELEASE_1001 rc3 10.0.1
|
$ sh 9/debian/orig-tar.sh 9.0.1 rc3
|
||||||
|
|
||||||
For a stable release, the syntax is:
|
For a stable release, the syntax is:
|
||||||
|
|
||||||
$ sh snapshot/debian/orig-tar.sh RELEASE_1000 final 10.0
|
$ sh 9/debian/orig-tar.sh 9.0.0
|
||||||
|
|
||||||
|
|
||||||
Additional maintainer scripts
|
Additional maintainer scripts
|
||||||
=============================
|
=============================
|
||||||
|
10
debian/changelog
vendored
10
debian/changelog
vendored
@ -110,10 +110,18 @@ llvm-toolchain-snapshot (1:10~svn366440-1~exp1) experimental; urgency=medium
|
|||||||
|
|
||||||
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 18 Jul 2019 18:58:32 +0200
|
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 18 Jul 2019 18:58:32 +0200
|
||||||
|
|
||||||
llvm-toolchain-9 (1:9-4) unstable; urgency=medium
|
llvm-toolchain-9 (1:9.0.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Repack to move to git
|
||||||
|
* Move the checkout of the sources from svn to git
|
||||||
|
* Use -DLLVM_ENABLE_PROJECTS instead of symlinks
|
||||||
|
* Use -DBOOTSTRAP_LLVM_ENABLE_LTO instead of
|
||||||
|
-DLLVM_ENABLE_LTO (not sure what it wasn't done)
|
||||||
* Add dependency between libclang-cpp => libllvm with the exact version
|
* Add dependency between libclang-cpp => libllvm with the exact version
|
||||||
(Closes: #942526)
|
(Closes: #942526)
|
||||||
|
|
||||||
|
-- Sylvestre Ledru <sylvestre@debian.org> Sat, 19 Oct 2019 10:30:41 +0200
|
||||||
|
|
||||||
llvm-toolchain-9 (1:9-3) unstable; urgency=medium
|
llvm-toolchain-9 (1:9-3) unstable; urgency=medium
|
||||||
|
|
||||||
* python-clang-9: missing dependency on libclang-9-dev
|
* python-clang-9: missing dependency on libclang-9-dev
|
||||||
|
2
debian/clang-X.Y-doc.docs.in
vendored
2
debian/clang-X.Y-doc.docs.in
vendored
@ -1,2 +1,2 @@
|
|||||||
tools/clang/docs/_build/html/
|
clang/docs/_build/html/
|
||||||
|
|
||||||
|
6
debian/clang-tools-X.Y.install.in
vendored
6
debian/clang-tools-X.Y.install.in
vendored
@ -31,9 +31,9 @@ usr/lib/llvm-@LLVM_VERSION@/bin/pp-trace
|
|||||||
usr/lib/llvm-@LLVM_VERSION@/bin/clang-move
|
usr/lib/llvm-@LLVM_VERSION@/bin/clang-move
|
||||||
usr/lib/llvm-@LLVM_VERSION@/bin/clang-offload-wrapper
|
usr/lib/llvm-@LLVM_VERSION@/bin/clang-offload-wrapper
|
||||||
|
|
||||||
tools/clang/tools/scan-build-@LLVM_VERSION@ usr/share/clang/
|
clang/tools/scan-build-@LLVM_VERSION@ usr/share/clang/
|
||||||
tools/clang/tools/scan-build-py-@LLVM_VERSION@ usr/share/clang/
|
clang/tools/scan-build-py-@LLVM_VERSION@ usr/share/clang/
|
||||||
tools/clang/tools/scan-view-@LLVM_VERSION@ usr/share/clang/
|
clang/tools/scan-view-@LLVM_VERSION@ usr/share/clang/
|
||||||
|
|
||||||
usr/lib/llvm-@LLVM_VERSION@/share/clang/run-find-all-symbols.py
|
usr/lib/llvm-@LLVM_VERSION@/share/clang/run-find-all-symbols.py
|
||||||
usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-include-fixer.py
|
usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-include-fixer.py
|
||||||
|
22
debian/llvm-X.Y-dev.install.in
vendored
22
debian/llvm-X.Y-dev.install.in
vendored
@ -12,21 +12,21 @@ usr/lib/llvm-@LLVM_VERSION@/include/llvm-c/ usr/include/llvm-c-@LLVM_VERSION@/
|
|||||||
# Explicit debian/tmp since there are multiple declarations
|
# Explicit debian/tmp since there are multiple declarations
|
||||||
debian/tmp/usr/lib/llvm-@LLVM_VERSION@/lib/cmake/llvm/*.cmake
|
debian/tmp/usr/lib/llvm-@LLVM_VERSION@/lib/cmake/llvm/*.cmake
|
||||||
|
|
||||||
utils/vim/indent/llvm-@LLVM_VERSION@.vim usr/share/vim/addons/indent/
|
llvm/utils/vim/indent/llvm-@LLVM_VERSION@.vim usr/share/vim/addons/indent/
|
||||||
|
|
||||||
utils/vim/syntax/llvm-@LLVM_VERSION@.vim usr/share/vim/addons/syntax/
|
llvm/utils/vim/syntax/llvm-@LLVM_VERSION@.vim usr/share/vim/addons/syntax/
|
||||||
utils/vim/syntax/tablegen-@LLVM_VERSION@.vim usr/share/vim/addons/syntax/
|
llvm/utils/vim/syntax/tablegen-@LLVM_VERSION@.vim usr/share/vim/addons/syntax/
|
||||||
|
|
||||||
utils/vim/ftdetect/llvm-@LLVM_VERSION@.vim usr/share/vim/addons/ftdetect/
|
llvm/utils/vim/ftdetect/llvm-@LLVM_VERSION@.vim usr/share/vim/addons/ftdetect/
|
||||||
utils/vim/ftdetect/tablegen-@LLVM_VERSION@.vim usr/share/vim/addons/ftdetect/
|
llvm/utils/vim/ftdetect/tablegen-@LLVM_VERSION@.vim usr/share/vim/addons/ftdetect/
|
||||||
|
|
||||||
utils/vim/ftplugin/llvm-@LLVM_VERSION@.vim usr/share/vim/addons/ftplugin/
|
llvm/utils/vim/ftplugin/llvm-@LLVM_VERSION@.vim usr/share/vim/addons/ftplugin/
|
||||||
utils/vim/ftplugin/tablegen-@LLVM_VERSION@.vim usr/share/vim/addons/ftplugin/
|
llvm/utils/vim/ftplugin/tablegen-@LLVM_VERSION@.vim usr/share/vim/addons/ftplugin/
|
||||||
|
|
||||||
utils/vim/llvm-@LLVM_VERSION@-vimrc usr/share/vim/addons
|
llvm/utils/vim/llvm-@LLVM_VERSION@-vimrc usr/share/vim/addons
|
||||||
|
|
||||||
|
|
||||||
utils/emacs/emacs.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
llvm/utils/emacs/emacs.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
||||||
utils/emacs/llvm-mode.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
llvm/utils/emacs/llvm-mode.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
||||||
utils/emacs/tablegen-mode.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
llvm/utils/emacs/tablegen-mode.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
||||||
|
|
||||||
|
2
debian/llvm-X.Y-doc.install.in
vendored
2
debian/llvm-X.Y-doc.install.in
vendored
@ -1,4 +1,4 @@
|
|||||||
docs/_build/html usr/share/doc/llvm-@LLVM_VERSION@-doc/
|
llvm/docs/_build/html usr/share/doc/llvm-@LLVM_VERSION@-doc/
|
||||||
#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/html.tar.gz
|
#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/html.tar.gz
|
||||||
#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/ocamldoc.tar.gz
|
#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/ocamldoc.tar.gz
|
||||||
#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/html/Dummy.html
|
#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/html/Dummy.html
|
||||||
|
2
debian/llvm-X.Y-tools.install.in
vendored
2
debian/llvm-X.Y-tools.install.in
vendored
@ -9,7 +9,7 @@ usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/opt-diff.py
|
|||||||
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/optpmap.py
|
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/optpmap.py
|
||||||
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/opt-stats.py
|
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/opt-stats.py
|
||||||
|
|
||||||
utils/lit/* /usr/lib/llvm-@LLVM_VERSION@/build/utils/lit/
|
llvm/utils/lit/* /usr/lib/llvm-@LLVM_VERSION@/build/utils/lit/
|
||||||
|
|
||||||
usr/bin/count-@LLVM_VERSION@
|
usr/bin/count-@LLVM_VERSION@
|
||||||
usr/bin/FileCheck-@LLVM_VERSION@
|
usr/bin/FileCheck-@LLVM_VERSION@
|
||||||
|
269
debian/orig-tar.sh
vendored
269
debian/orig-tar.sh
vendored
@ -13,206 +13,127 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# TODO rest of the options
|
# commands:
|
||||||
|
# sh 9/debian/orig-tar.sh release/9.x
|
||||||
|
# sh 9/debian/orig-tar.sh 9.0.0 rc3
|
||||||
|
# sh 9/debian/orig-tar.sh 9.0.1 rc3
|
||||||
|
# Stable release
|
||||||
|
# sh 9/debian/orig-tar.sh 9.0.0 9.0.0
|
||||||
|
|
||||||
|
|
||||||
# To create an rc1 release:
|
# To create an rc1 release:
|
||||||
# sh 4.0/debian/orig-tar.sh RELEASE_40 rc1
|
# sh 4.0/debian/orig-tar.sh release/9.x
|
||||||
|
|
||||||
SVN_BASE_URL=https://llvm.org/svn/llvm-project/
|
GIT_BASE_URL=https://github.com/llvm/llvm-project
|
||||||
MAJOR_VERSION=10
|
|
||||||
CURRENT_VERSION=10 # Should be changed to 3.5.1 later
|
PATH_DEBIAN="$(pwd)/$(dirname $0)/../"
|
||||||
|
cd "$PATH_DEBIAN"
|
||||||
|
MAJOR_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p")
|
||||||
|
if test -z "$MAJOR_VERSION"; then
|
||||||
|
echo "Could not detect the major version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
CURRENT_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1,p")
|
||||||
|
if test -z "$CURRENT_VERSION"; then
|
||||||
|
echo "Could not detect the full version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd -
|
||||||
|
|
||||||
if test -n "$1"; then
|
if test -n "$1"; then
|
||||||
# https://llvm.org/svn/llvm-project/{cfe,llvm,compiler-rt,...}/branches/google/stable/
|
# https://github.com/llvm/llvm-project/tree/release/9.x
|
||||||
# For example: sh 4.0/debian/orig-tar.sh release_400
|
# For example: sh 4.0/debian/orig-tar.sh release/9.x
|
||||||
BRANCH=$1
|
BRANCH=$1
|
||||||
|
if ! echo "$1"|grep release/; then
|
||||||
|
# The first argument is NOT a branch, means that it is a stable release
|
||||||
|
FINAL_RELEASE=true
|
||||||
|
EXACT_VERSION=$1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# No argument, we need trunk
|
||||||
|
cd "$PATH_DEBIAN"
|
||||||
|
SOURCE=$(dpkg-parsechangelog |grep ^Source|awk '{print $2}')
|
||||||
|
cd -
|
||||||
|
if test "$SOURCE" != "llvm-toolchain-snapshot"; then
|
||||||
|
echo "Checkout of the master is only available for llvm-toolchain-snapshot"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
BRANCH="master"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$1" -a -n "$2"; then
|
if test -n "$1" -a -n "$2"; then
|
||||||
# https://llvm.org/svn/llvm-project/{cfe,llvm,compiler-rt,...}/tags/RELEASE_34/rc1/
|
# https://github.com/llvm/llvm-project/releases/tag/llvmorg-9.0.0
|
||||||
# For example: sh 4.0/debian/orig-tar.sh RELEASE_401 rc3 4.0.1
|
# For example: sh 4.0/debian/orig-tar.sh 4.0.1 rc3
|
||||||
BRANCH=$1
|
# or sh 9/debian/orig-tar.sh 9.0.0
|
||||||
TAG=$2
|
TAG=$2
|
||||||
RCRELEASE="true"
|
RCRELEASE="true"
|
||||||
if test -z "$3"; then
|
EXACT_VERSION=$1
|
||||||
echo "Please provide the exact version. Used for the tarball name Ex: 4.0.1"
|
|
||||||
fi
|
|
||||||
EXACT_VERSION=$3
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
get_svn_url() {
|
# Update or retrieve the repo
|
||||||
MODULE=$1
|
mkdir -p git-archive
|
||||||
BRANCH=$2
|
cd git-archive
|
||||||
TAG=$3
|
if test -d llvm-project; then
|
||||||
if test -n "$TAG"; then
|
# Update it
|
||||||
SVN_URL="$SVN_BASE_URL/$MODULE/tags/$BRANCH/$TAG"
|
cd llvm-project
|
||||||
else
|
git remote update > /dev/null
|
||||||
if test -n "$BRANCH"; then
|
git reset --hard origin/master > /dev/null
|
||||||
SVN_URL="$SVN_BASE_URL/$MODULE/branches/$BRANCH"
|
git clean -qfd
|
||||||
else
|
git checkout master > /dev/null
|
||||||
SVN_URL="$SVN_BASE_URL/$MODULE/trunk/"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo $SVN_URL
|
|
||||||
}
|
|
||||||
|
|
||||||
get_higher_revision() {
|
|
||||||
PROJECTS="llvm cfe compiler-rt polly lld lldb clang-tools-extra"
|
|
||||||
REVISION_MAX=0
|
|
||||||
for f in $PROJECTS; do
|
|
||||||
REVISION=$(LANG=C svn info $(get_svn_url $f $BRANCH $TAG)|grep "^Last Changed Rev:"|awk '{print $4}')
|
|
||||||
if test $REVISION -gt $REVISION_MAX; then
|
|
||||||
REVISION_MAX=$REVISION
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo $REVISION_MAX
|
|
||||||
}
|
|
||||||
|
|
||||||
SVN_ARCHIVES=svn-archives
|
|
||||||
|
|
||||||
checkout_sources() {
|
|
||||||
PROJECT=$1
|
|
||||||
URL=$2
|
|
||||||
TARGET=$3
|
|
||||||
BRANCH=$4
|
|
||||||
if test -n "$BRANCH"; then
|
|
||||||
REVISION=$5
|
|
||||||
fi
|
|
||||||
echo "$PROJECT / $URL / $BRANCH / $TARGET / $REVISION"
|
|
||||||
|
|
||||||
cd $SVN_ARCHIVES/
|
|
||||||
DEST=$PROJECT-$BRANCH
|
|
||||||
if test -n "$TAG"; then
|
|
||||||
DEST=$DEST-$TAG
|
|
||||||
fi
|
|
||||||
if test -d $DEST; then
|
|
||||||
cd $DEST
|
|
||||||
if test -n "$BRANCH"; then
|
|
||||||
svn cleanup
|
|
||||||
svn up
|
|
||||||
else
|
|
||||||
svn cleanup
|
|
||||||
svn up -r $REVISION
|
|
||||||
fi
|
|
||||||
cd ..
|
|
||||||
else
|
|
||||||
if test -n "$BRANCH"; then
|
|
||||||
svn co $URL $DEST
|
|
||||||
else
|
|
||||||
svn co -r $REVISION $URL $DEST
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
rm -rf ../$TARGET
|
|
||||||
rsync -r --exclude=.svn $DEST/ ../$TARGET
|
|
||||||
cd ..
|
cd ..
|
||||||
}
|
|
||||||
|
|
||||||
if test -n "$BRANCH"; then
|
|
||||||
REVISION=$(get_higher_revision)
|
|
||||||
# Do not use the revision when exporting branch. We consider that all the
|
|
||||||
# branch are sync
|
|
||||||
SVN_CMD="svn export"
|
|
||||||
else
|
else
|
||||||
REVISION=$(LANG=C svn info $(get_svn_url llvm)|grep "^Revision:"|awk '{print $2}')
|
# Download it
|
||||||
SVN_CMD="svn export -r $REVISION"
|
git clone $GIT_BASE_URL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$RCRELEASE"; then
|
cd llvm-project
|
||||||
if test "$TAG" = "final"; then
|
if test -z "$TAG" -a -z "$FINAL_RELEASE"; then
|
||||||
VERSION=$EXACT_VERSION
|
# Building a branch
|
||||||
|
git checkout $BRANCH
|
||||||
|
if test $BRANCH != "master"; then
|
||||||
|
VERSION=$(echo $BRANCH|cut -d/ -f2|cut -d. -f1)
|
||||||
|
if ! echo "$MAJOR_VERSION"|grep -q "$VERSION"; then
|
||||||
|
echo "mismatch in version: Dir=$MAJOR_VERSION Provided=$VERSION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
VERSION=$EXACT_VERSION"~+"$TAG
|
# No argument, take master. So, it can only be snapshot
|
||||||
|
VERSION=$MAJOR_VERSION
|
||||||
|
MAJOR_VERSION=snapshot
|
||||||
fi
|
fi
|
||||||
FULL_VERSION="llvm-toolchain-"$MAJOR_VERSION"_"$VERSION
|
# the + is here to make sure that this version is considered more recent than the svn
|
||||||
|
# dpkg --compare-versions 10~svn374977-1~exp1 lt 10~+2019-svn374977-1~exp1
|
||||||
|
# to verify that
|
||||||
|
VERSION="${VERSION}~+$(git log -1 --pretty=format:'%ci-%h'|sed -e "s|+\(.*\)-|+|g" -e "s| ||g" -e "s|-||g" -e "s|:||g" )"
|
||||||
else
|
else
|
||||||
VERSION=$CURRENT_VERSION"~svn"$REVISION
|
|
||||||
if echo $BRANCH|grep -q release_; then
|
if ! echo "$EXACT_VERSION"|grep -q "$MAJOR_VERSION"; then
|
||||||
FULL_VERSION="llvm-toolchain-"$MAJOR_VERSION"_"$VERSION
|
echo "Mismatch in version: Dir=$MAJOR_VERSION Provided=$EXACT_VERSION"
|
||||||
else
|
exit 1
|
||||||
FULL_VERSION="llvm-toolchain-snapshot_"$VERSION
|
|
||||||
fi
|
fi
|
||||||
|
git_tag="llvmorg-$EXACT_VERSION"
|
||||||
|
VERSION=$EXACT_VERSION
|
||||||
|
if test -n "$TAG" -a -z "$FINAL_RELEASE"; then
|
||||||
|
git_tag="$git_tag-$TAG"
|
||||||
|
VERSION="$VERSION~+$TAG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
git checkout "$git_tag" > /dev/null
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $SVN_ARCHIVES
|
# cleanup
|
||||||
|
rm -rf */www/
|
||||||
|
|
||||||
# LLVM
|
cd ../
|
||||||
LLVM_TARGET=$FULL_VERSION
|
BASE="llvm-toolchain-${MAJOR_VERSION}_${VERSION}"
|
||||||
checkout_sources llvm $(get_svn_url llvm $BRANCH $TAG) $LLVM_TARGET "$BRANCH" $REVISION
|
FILENAME="${BASE}.orig.tar.xz"
|
||||||
tar jcf $FULL_VERSION.orig.tar.bz2 $LLVM_TARGET
|
echo "Compressing to $FILENAME"
|
||||||
rm -rf $LLVM_TARGET
|
tar Jcf ../"$FILENAME" --exclude .git --transform="s/llvm-project/$BASE/" llvm-project
|
||||||
|
|
||||||
|
|
||||||
# Clang
|
|
||||||
CLANG_TARGET=clang_$VERSION
|
|
||||||
checkout_sources clang $(get_svn_url cfe $BRANCH $TAG) $CLANG_TARGET "$BRANCH" $REVISION
|
|
||||||
tar jcf $FULL_VERSION.orig-clang.tar.bz2 $CLANG_TARGET
|
|
||||||
rm -rf $CLANG_TARGET
|
|
||||||
|
|
||||||
|
|
||||||
# Clang extra
|
|
||||||
CLANG_TARGET=clang-tools-extra_$VERSION
|
|
||||||
checkout_sources clang-tools-extra $(get_svn_url clang-tools-extra $BRANCH $TAG) $CLANG_TARGET "$BRANCH" $REVISION
|
|
||||||
tar jcf $FULL_VERSION.orig-clang-tools-extra.tar.bz2 $CLANG_TARGET
|
|
||||||
rm -rf $CLANG_TARGET
|
|
||||||
|
|
||||||
# Compiler-rt
|
|
||||||
COMPILER_RT_TARGET=compiler-rt_$VERSION
|
|
||||||
checkout_sources compiler-rt $(get_svn_url compiler-rt $BRANCH $TAG) $COMPILER_RT_TARGET "$BRANCH" $REVISION
|
|
||||||
#$SVN_CMD $(get_svn_url compiler-rt $BRANCH $TAG) $COMPILER_RT_TARGET
|
|
||||||
tar jcf $FULL_VERSION.orig-compiler-rt.tar.bz2 $COMPILER_RT_TARGET
|
|
||||||
rm -rf $COMPILER_RT_TARGET
|
|
||||||
|
|
||||||
# Polly
|
|
||||||
POLLY_TARGET=polly_$VERSION
|
|
||||||
checkout_sources polly $(get_svn_url polly $BRANCH $TAG) $POLLY_TARGET "$BRANCH" $REVISION
|
|
||||||
#$SVN_CMD $(get_svn_url polly $BRANCH $TAG) $POLLY_TARGET
|
|
||||||
rm -rf $POLLY_TARGET/www $POLLY_TARGET/autoconf/config.sub $POLLY_TARGET/autoconf/config.guess
|
|
||||||
tar jcf $FULL_VERSION.orig-polly.tar.bz2 $POLLY_TARGET
|
|
||||||
rm -rf $POLLY_TARGET
|
|
||||||
|
|
||||||
# LLD
|
|
||||||
LLD_TARGET=lld_$VERSION
|
|
||||||
checkout_sources lld $(get_svn_url lld $BRANCH $TAG) $LLD_TARGET "$BRANCH" $REVISION
|
|
||||||
#$SVN_CMD $(get_svn_url lld $BRANCH $TAG) $LLD_TARGET
|
|
||||||
rm -rf $LLD_TARGET/www/
|
|
||||||
tar jcf $FULL_VERSION.orig-lld.tar.bz2 $LLD_TARGET
|
|
||||||
rm -rf $LLD_TARGET
|
|
||||||
|
|
||||||
# LLDB
|
|
||||||
LLDB_TARGET=lldb_$VERSION
|
|
||||||
checkout_sources lldb $(get_svn_url lldb $BRANCH $TAG) $LLDB_TARGET "$BRANCH" $REVISION
|
|
||||||
#$SVN_CMD $(get_svn_url lldb $BRANCH $TAG) $LLDB_TARGET
|
|
||||||
rm -rf $LLDB_TARGET/www/
|
|
||||||
tar jcf $FULL_VERSION.orig-lldb.tar.bz2 $LLDB_TARGET
|
|
||||||
rm -rf $LLDB_TARGET
|
|
||||||
|
|
||||||
# OPENMP
|
|
||||||
OPENMP_TARGET=openmp_$VERSION
|
|
||||||
checkout_sources openmp $(get_svn_url openmp $BRANCH $TAG) $OPENMP_TARGET "$BRANCH" $REVISION
|
|
||||||
rm -rf $OPENMP_TARGET/www/
|
|
||||||
tar jcf $FULL_VERSION.orig-openmp.tar.bz2 $OPENMP_TARGET
|
|
||||||
rm -rf $OPENMP_TARGET
|
|
||||||
|
|
||||||
# LIBCXX
|
|
||||||
LIBCXX_TARGET=libcxx_$VERSION
|
|
||||||
checkout_sources libcxx $(get_svn_url libcxx $BRANCH $TAG) $LIBCXX_TARGET "$BRANCH" $REVISION
|
|
||||||
rm -rf $LIBCXX_TARGET/www/
|
|
||||||
tar jcf $FULL_VERSION.orig-libcxx.tar.bz2 $LIBCXX_TARGET
|
|
||||||
rm -rf $LIBCXX_TARGET
|
|
||||||
|
|
||||||
# LIBCXXABI
|
|
||||||
LIBCXXABI_TARGET=libcxxabi_$VERSION
|
|
||||||
checkout_sources libcxxabi $(get_svn_url libcxxabi $BRANCH $TAG) $LIBCXXABI_TARGET "$BRANCH" $REVISION
|
|
||||||
rm -rf $LIBCXXABI_TARGET/www/
|
|
||||||
tar jcf $FULL_VERSION.orig-libcxxabi.tar.bz2 $LIBCXXABI_TARGET
|
|
||||||
rm -rf $LIBCXXABI_TARGET
|
|
||||||
|
|
||||||
|
|
||||||
PATH_DEBIAN="$(pwd)/$(dirname $0)/../"
|
|
||||||
echo "going into $PATH_DEBIAN"
|
|
||||||
export DEBFULLNAME="Sylvestre Ledru"
|
export DEBFULLNAME="Sylvestre Ledru"
|
||||||
export DEBEMAIL="sylvestre@debian.org"
|
export DEBEMAIL="sylvestre@debian.org"
|
||||||
cd $PATH_DEBIAN
|
cd "$PATH_DEBIAN"
|
||||||
|
|
||||||
if test -z "$DISTRIBUTION"; then
|
if test -z "$DISTRIBUTION"; then
|
||||||
DISTRIBUTION="experimental"
|
DISTRIBUTION="experimental"
|
||||||
@ -222,6 +143,6 @@ if test -n "$RCRELEASE" -o -n "$BRANCH"; then
|
|||||||
EXTRA_DCH_FLAGS="--force-bad-version --allow-lower-version"
|
EXTRA_DCH_FLAGS="--force-bad-version --allow-lower-version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dch $EXTRA_DCH_FLAGS --distribution $DISTRIBUTION --newversion 1:$VERSION-1~exp1 "New snapshot release"
|
dch "$EXTRA_DCH_FLAGS" --distribution $DISTRIBUTION --newversion 1:"$VERSION"-1~exp1 "New snapshot release"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
38
debian/patches/clang-riscv64-rv64gc.diff
vendored
Normal file
38
debian/patches/clang-riscv64-rv64gc.diff
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Index: llvm-toolchain-9_9.0.0/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-9_9.0.0.orig/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
|
||||||
|
+++ llvm-toolchain-9_9.0.0/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
|
||||||
|
@@ -350,6 +350,13 @@ void riscv::getRISCVTargetFeatures(const
|
||||||
|
|
||||||
|
// Handle all other types of extensions.
|
||||||
|
getExtensionFeatures(D, Args, Features, MArch, OtherExts);
|
||||||
|
+ } else {
|
||||||
|
+ // Default to imafdc aka gc
|
||||||
|
+ Features.push_back("+m");
|
||||||
|
+ Features.push_back("+a");
|
||||||
|
+ Features.push_back("+f");
|
||||||
|
+ Features.push_back("+d");
|
||||||
|
+ Features.push_back("+c");
|
||||||
|
}
|
||||||
|
|
||||||
|
// -mrelax is default, unless -mno-relax is specified.
|
||||||
|
@@ -375,5 +382,5 @@ StringRef riscv::getRISCVABI(const ArgLi
|
||||||
|
if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ))
|
||||||
|
return A->getValue();
|
||||||
|
|
||||||
|
- return Triple.getArch() == llvm::Triple::riscv32 ? "ilp32" : "lp64";
|
||||||
|
+ return Triple.getArch() == llvm::Triple::riscv32 ? "ilp32" : "lp64d";
|
||||||
|
}
|
||||||
|
Index: llvm-toolchain-9_9.0.0/clang/lib/Driver/ToolChains/Clang.cpp
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-9_9.0.0.orig/clang/lib/Driver/ToolChains/Clang.cpp
|
||||||
|
+++ llvm-toolchain-9_9.0.0/clang/lib/Driver/ToolChains/Clang.cpp
|
||||||
|
@@ -1862,7 +1862,7 @@ void Clang::AddRISCVTargetArgs(const Arg
|
||||||
|
else if (Triple.getArch() == llvm::Triple::riscv32)
|
||||||
|
ABIName = "ilp32";
|
||||||
|
else if (Triple.getArch() == llvm::Triple::riscv64)
|
||||||
|
- ABIName = "lp64";
|
||||||
|
+ ABIName = "lp64d";
|
||||||
|
else
|
||||||
|
llvm_unreachable("Unexpected triple!");
|
||||||
|
|
2
debian/python-clang-X.Y.install.in
vendored
2
debian/python-clang-X.Y.install.in
vendored
@ -1 +1 @@
|
|||||||
tools/clang/bindings/python/clang/ /usr/lib/python2.7/dist-packages/
|
clang/bindings/python/clang/ /usr/lib/python2.7/dist-packages/
|
||||||
|
72
debian/rules
vendored
72
debian/rules
vendored
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
PROJECTS="clang;clang-tools-extra;libcxx;libcxxabi;lldb;compiler-rt;lld;polly;debuginfo-tests;openmp"
|
||||||
|
|
||||||
TARGET_BUILD := build-llvm
|
TARGET_BUILD := build-llvm
|
||||||
TARGET_BUILD_STAGE2 := $(TARGET_BUILD)/tools/clang/stage2-bins
|
TARGET_BUILD_STAGE2 := $(TARGET_BUILD)/tools/clang/stage2-bins
|
||||||
DEB_INST := $(CURDIR)/debian/tmp/
|
DEB_INST := $(CURDIR)/debian/tmp/
|
||||||
@ -245,7 +247,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS)))
|
|||||||
# armhf is not yet quite ready for Thin, it FTBFS
|
# armhf is not yet quite ready for Thin, it FTBFS
|
||||||
# see https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-8&arch=armhf&ver=1%3A8.0.1%7E%2Brc2-1%7Eexp1&stamp=1560334266&raw=0
|
# see https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-8&arch=armhf&ver=1%3A8.0.1%7E%2Brc2-1%7Eexp1&stamp=1560334266&raw=0
|
||||||
ifeq (,$(filter $(DEB_HOST_ARCH), armhf))
|
ifeq (,$(filter $(DEB_HOST_ARCH), armhf))
|
||||||
CMAKE_EXTRA += -DLLVM_ENABLE_LTO="Thin"
|
CMAKE_EXTRA += -DBOOTSTRAP_LLVM_ENABLE_LTO="Thin"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -317,55 +319,6 @@ override_dh_auto_configure: preconfigure
|
|||||||
sed -e "s|@DEB_PATCHSETVERSION@|$(DEBIAN_REVISION)|" \
|
sed -e "s|@DEB_PATCHSETVERSION@|$(DEBIAN_REVISION)|" \
|
||||||
debian/debian_path.h > clang/include/clang/Debian/debian_path.h
|
debian/debian_path.h > clang/include/clang/Debian/debian_path.h
|
||||||
|
|
||||||
# Remove some old symlinks
|
|
||||||
cd tools/ && \
|
|
||||||
if test -h clang; then \
|
|
||||||
rm clang; \
|
|
||||||
fi; \
|
|
||||||
ln -s ../clang .; \
|
|
||||||
readlink clang
|
|
||||||
|
|
||||||
if test "$(POLLY_ENABLE)" = yes; then \
|
|
||||||
cd tools/ && \
|
|
||||||
if test -h polly; then \
|
|
||||||
rm polly; \
|
|
||||||
fi; \
|
|
||||||
ln -s ../polly .; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$(LLD_ENABLE)" = yes; then \
|
|
||||||
cd tools/ && \
|
|
||||||
if test -h lld; then \
|
|
||||||
rm lld; \
|
|
||||||
fi; \
|
|
||||||
ln -s ../lld .; \
|
|
||||||
readlink lld; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$(LLDB_ENABLE)" = yes; then \
|
|
||||||
cd tools/ && \
|
|
||||||
if test -h lldb; then \
|
|
||||||
rm lldb; \
|
|
||||||
fi; \
|
|
||||||
ln -s ../lldb .; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd projects/ && \
|
|
||||||
if test -h compiler-rt; then \
|
|
||||||
rm compiler-rt; \
|
|
||||||
fi; \
|
|
||||||
ln -s ../compiler-rt .; \
|
|
||||||
readlink compiler-rt
|
|
||||||
|
|
||||||
if test "$(OPENMP_ENABLE)" = yes; then \
|
|
||||||
cd projects/ && \
|
|
||||||
if test -h openmp; then \
|
|
||||||
rm openmp; \
|
|
||||||
fi; \
|
|
||||||
ln -s ../openmp .; \
|
|
||||||
readlink openmp; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure coverity (we need the compilers) + work around perf issues
|
# Configure coverity (we need the compilers) + work around perf issues
|
||||||
-(if test $(COVERITY_ENABLE) -eq 1; then \
|
-(if test $(COVERITY_ENABLE) -eq 1; then \
|
||||||
export PATH=$$PATH:/opt/cov-analysis/bin/; \
|
export PATH=$$PATH:/opt/cov-analysis/bin/; \
|
||||||
@ -387,10 +340,6 @@ override_dh_auto_configure: preconfigure
|
|||||||
--xml-option append_arg:"replace/llvm::AlignOf<NextTy>::Alignment/(llvm::AlignOf<NextTy>::Alignment)"; \
|
--xml-option append_arg:"replace/llvm::AlignOf<NextTy>::Alignment/(llvm::AlignOf<NextTy>::Alignment)"; \
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
# Due to bug upstream, no symlink here
|
|
||||||
rm -fr tools/clang/tools/extra
|
|
||||||
cp -R -H clang-tools-extra tools/clang/tools/extra
|
|
||||||
|
|
||||||
echo "Running tests: $(RUN_TEST)"
|
echo "Running tests: $(RUN_TEST)"
|
||||||
|
|
||||||
# if cmake is installed in /tmp/cmake/ uses it
|
# if cmake is installed in /tmp/cmake/ uses it
|
||||||
@ -401,7 +350,8 @@ override_dh_auto_configure: preconfigure
|
|||||||
fi; \
|
fi; \
|
||||||
echo "Using cmake: $$CMAKE_BIN"; \
|
echo "Using cmake: $$CMAKE_BIN"; \
|
||||||
cd $(TARGET_BUILD) && \
|
cd $(TARGET_BUILD) && \
|
||||||
$(PRE_PROCESS_CONF) $$CMAKE_BIN ../ \
|
$(PRE_PROCESS_CONF) $$CMAKE_BIN ../llvm/ \
|
||||||
|
-DLLVM_ENABLE_PROJECTS=$(PROJECTS) \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-$(LLVM_VERSION) \
|
-DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-$(LLVM_VERSION) \
|
||||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
@ -475,7 +425,7 @@ LIBCXX_CMAKE_OPTIONS := \
|
|||||||
-DCMAKE_MODULE_LINKER_FLAGS="" \
|
-DCMAKE_MODULE_LINKER_FLAGS="" \
|
||||||
-DCMAKE_AR=$(CURDIR)/$(TARGET_BUILD_STAGE2)/bin/llvm-ar \
|
-DCMAKE_AR=$(CURDIR)/$(TARGET_BUILD_STAGE2)/bin/llvm-ar \
|
||||||
-DCMAKE_RANLIB=$(CURDIR)/$(TARGET_BUILD_STAGE2)/bin/llvm-ranlib \
|
-DCMAKE_RANLIB=$(CURDIR)/$(TARGET_BUILD_STAGE2)/bin/llvm-ranlib \
|
||||||
-DLLVM_EXTERNAL_LIT=$(BASE_PATH)/utils/lit/lit.py \
|
-DLLVM_EXTERNAL_LIT=$(BASE_PATH)/llvm/utils/lit/lit.py \
|
||||||
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
|
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
|
||||||
$(CMAKE_EXTRA) \
|
$(CMAKE_EXTRA) \
|
||||||
$(CMAKE_EXTRA_LIBCXX)
|
$(CMAKE_EXTRA_LIBCXX)
|
||||||
@ -529,7 +479,7 @@ override_dh_prep: build_doc
|
|||||||
dh_prep
|
dh_prep
|
||||||
|
|
||||||
build_doc:
|
build_doc:
|
||||||
cd $(CURDIR)/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
|
cd $(CURDIR)/llvm/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
|
||||||
cd $(CURDIR)/clang/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
|
cd $(CURDIR)/clang/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
|
||||||
-(if test "$(OCAML_ENABLE)" = yes; then \
|
-(if test "$(OCAML_ENABLE)" = yes; then \
|
||||||
make $(NJOBS) -C "$(TARGET_BUILD_STAGE2)/docs" ocaml_doc; \
|
make $(NJOBS) -C "$(TARGET_BUILD_STAGE2)/docs" ocaml_doc; \
|
||||||
@ -673,12 +623,12 @@ endif
|
|||||||
# copy the vim files (except that tablegen does not exist for indent
|
# copy the vim files (except that tablegen does not exist for indent
|
||||||
VIM_DIRS="ftdetect ftplugin syntax indent"; \
|
VIM_DIRS="ftdetect ftplugin syntax indent"; \
|
||||||
for dir in $$VIM_DIRS; do \
|
for dir in $$VIM_DIRS; do \
|
||||||
cp -f $(CURDIR)/utils/vim/$$dir/llvm.vim $(CURDIR)/utils/vim/$$dir/llvm-$(LLVM_VERSION).vim; \
|
cp -f $(CURDIR)/llvm/utils/vim/$$dir/llvm.vim $(CURDIR)/llvm/utils/vim/$$dir/llvm-$(LLVM_VERSION).vim; \
|
||||||
if test -f $(CURDIR)/utils/vim/$$dir/tablegen.vim; then \
|
if test -f $(CURDIR)/llvm/utils/vim/$$dir/tablegen.vim; then \
|
||||||
cp -f $(CURDIR)/utils/vim/$$dir/tablegen.vim $(CURDIR)/utils/vim/$$dir/tablegen-$(LLVM_VERSION).vim; \
|
cp -f $(CURDIR)/llvm/utils/vim/$$dir/tablegen.vim $(CURDIR)/llvm/utils/vim/$$dir/tablegen-$(LLVM_VERSION).vim; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
cp -f $(CURDIR)/utils/vim/vimrc $(CURDIR)/utils/vim/llvm-$(LLVM_VERSION)-vimrc
|
cp -f $(CURDIR)/llvm/utils/vim/vimrc $(CURDIR)/llvm/utils/vim/llvm-$(LLVM_VERSION)-vimrc
|
||||||
|
|
||||||
cp -f $(CURDIR)/clang/tools/clang-format/clang-format-diff.py $(CURDIR)/clang/tools/clang-format/clang-format-diff-$(LLVM_VERSION)
|
cp -f $(CURDIR)/clang/tools/clang-format/clang-format-diff.py $(CURDIR)/clang/tools/clang-format/clang-format-diff-$(LLVM_VERSION)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user