[PATCH] D118252: Adding cmake to the exported list of tarballs
Konrad Wilhelm Kleine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 28 08:28:06 PST 2022
kwk added a comment.
In D118252#3279576 <https://reviews.llvm.org/D118252#3279576>, @kwk wrote:
> One thing I have to try is adding a file to the end of the archive. On tar level that should just work.
As long as we're happy with not doing everything in one bash pipe but instead:
1. create a pure `*.tar` ball with `git archive`
2. append the `cmake` directory structure to the tarball as a top level directory
3. then compressing the tarball with `xz`
Then we can do it:
cd llvm-project/libcxx
# Remove any artifact
rm libcxx-HEAD.tar
# Create pure tar archive
git archive --prefix=libcxx/ -o libcxx-HEAD.tar HEAD .
# Show last files in tarball
# Notice the absence of anything statrting with cmake/
tar -tf libcxx-HEAD.tar | tail
# Output:
# libcxx/utils/libcxx/test/params.py
# libcxx/utils/libcxx/test/target_info.py
# libcxx/utils/libcxx/util.py
# libcxx/utils/merge_archives.py
# libcxx/utils/run.py
# libcxx/utils/ssh.py
# libcxx/utils/sym_diff.py
# libcxx/utils/symcheck-blacklists/
# libcxx/utils/symcheck-blacklists/linux_blacklist.txt
# libcxx/utils/symcheck-blacklists/osx_blacklist.txt
# Show that the git PAX header can properly be read before appending to the archive
cat libcxx-HEAD.tar | git get-tar-commit-id
# Output:
# d22958975bf8b55ac50aed6b0068e7fb69cff2c2
# Append the cmake tree
tar --append -f libcxx-HEAD.tar ../cmake
# Output:
# tar: Removing leading `../' from member names
# tar: Removing leading `../' from hard link targets
# Show that the cmake/ tree was added
tar -tf libcxx-HEAD.tar | tail
# Output:
# cmake/
# cmake/Modules/
# cmake/Modules/CheckLinkerFlag.cmake
# cmake/Modules/EnableLanguageNolink.cmake
# cmake/Modules/ExtendPath.cmake
# cmake/Modules/FindPrefixFromConfig.cmake
# cmake/Modules/HandleCompilerRT.cmake
# cmake/Modules/HandleOutOfTreeLLVM.cmake
# cmake/Modules/SetPlatformToolchainTools.cmake
# cmake/README.rst
# Show that libcxx is still there
tar -tf libcxx-HEAD.tar | head -n1
# Output:
# libcxx/
# Show that the Git PAX header hasn't changed:
cat libcxx-HEAD.tar | git get-tar-commit-id
# Output:
# d22958975bf8b55ac50aed6b0068e7fb69cff2c2
I'm going to make another patch for this and we can see with which one we want to proceed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118252/new/
https://reviews.llvm.org/D118252
More information about the llvm-commits
mailing list