[PATCH] D121972: Add cmake/ to release tarballs via concatenation
Konrad Wilhelm Kleine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 05:02:17 PDT 2022
kwk accepted this revision.
kwk added a comment.
This revision is now accepted and ready to land.
I've tested this patch and it works for me:
Here's the relevant part of the transcript when enabling `set -x` and just having packaging up `compiler-rt`:
++ mktemp -d
+ tmp_dir=/tmp/tmp.GYsvF1Vg58
+ cmake_archive_file=/tmp/tmp.GYsvF1Vg58/cmake.tar
+ trap 'rm -rv /tmp/tmp.GYsvF1Vg58' EXIT
+ pushd /home/kkleine/llvm-project
~/llvm-project ~/llvm-project/llvm/utils/release
+ git archive -o /tmp/tmp.GYsvF1Vg58/cmake.tar upstream/main cmake/
+ popd
~/llvm-project/llvm/utils/release
+ for proj in $projects
+ echo 'Creating tarball for compiler-rt ...'
Creating tarball for compiler-rt ...
+ pushd /home/kkleine/llvm-project/compiler-rt
~/llvm-project/compiler-rt ~/llvm-project/llvm/utils/release
+ tmp_archive_file=/tmp/tmp.GYsvF1Vg58/compiler-rt.tar
+ git archive --prefix=compiler-rt-15.0.0.src/ -o /tmp/tmp.GYsvF1Vg58/compiler-rt.tar upstream/main .
+ tar -Af /tmp/tmp.GYsvF1Vg58/compiler-rt.tar /tmp/tmp.GYsvF1Vg58/cmake.tar
+ xz
++ template_file compiler-rt
++ export PROJECT=compiler-rt YYYYMMDD=20220321 RC= RELEASE=15.0.0 GIT_REF=5be5d0f56e25b8f1669df517018f43621f9b7e0f
++ PROJECT=compiler-rt
++ YYYYMMDD=20220321
++ RC=
++ RELEASE=15.0.0
++ GIT_REF=5be5d0f56e25b8f1669df517018f43621f9b7e0f
+++ echo '${PROJECT}-${YYYYMMDD}.src.tar.xz'
+++ envsubst '$PROJECT $RELEASE $RC $YYYYMMDD $GIT_REF'
++ basename compiler-rt-20220321.src.tar.xz
++ unset PROJECT YYYYMMDD RC RELEASE GIT_REF
+ popd
~/llvm-project/llvm/utils/release
+ exit 0
+ rm -rv /tmp/tmp.GYsvF1Vg58
removed '/tmp/tmp.GYsvF1Vg58/compiler-rt.tar'
removed '/tmp/tmp.GYsvF1Vg58/cmake.tar'
removed directory '/tmp/tmp.GYsvF1Vg58'
The resulting `.tar.xz` file contains everything we wanted.
Here's the diff I applied to speed up the testing:
diff --git a/llvm/utils/release/export.sh b/llvm/utils/release/export.sh
index 55e38ab12bc7..b67fc69ac7a2 100755
--- a/llvm/utils/release/export.sh
+++ b/llvm/utils/release/export.sh
@@ -11,9 +11,10 @@
#
#===------------------------------------------------------------------------===#
-set -e
+set -ex
projects="llvm clang compiler-rt libcxx libcxxabi libclc clang-tools-extra polly lldb lld openmp libunwind flang"
+projects="compiler-rt"
release=""
rc=""
@@ -112,7 +113,7 @@ export_sources() {
echo "$rc" > $target_dir/llvm-rc-$yyyymmdd.txt
echo "$git_rev" > $target_dir/llvm-git-revision-$yyyymmdd.txt
- git archive --prefix=llvm-project-$release$rc.src/ $tree_id . | xz >$target_dir/$(template_file llvm-project)
+ # git archive --prefix=llvm-project-$release$rc.src/ $tree_id . | xz >$target_dir/$(template_file llvm-project)
popd
if [ -z "$snapshot" ]; then
================
Comment at: llvm/utils/release/export.sh:134
+ cmake_archive_file=$tmp_dir/cmake.tar
+ trap "rm -rv $tmp_dir" EXIT
+ pushd $llvm_src_dir
----------------
I'm unsure if this needs to be verbose.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121972/new/
https://reviews.llvm.org/D121972
More information about the llvm-commits
mailing list