about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorJon Gjengset <jongje@amazon.com>2023-03-24 16:29:38 -0700
committerJon Gjengset <jongje@amazon.com>2023-03-24 17:44:32 -0700
commit4d5501037a39a3c58421a02c45aec31a1d57300e (patch)
tree53815b9c1ad464047974b8d4aa2b456731c0c561 /compiler/rustc_codegen_llvm/src/errors.rs
parent99c49d95cd7d704d2226859cfdc419c930cde9c6 (diff)
downloadrust-4d5501037a39a3c58421a02c45aec31a1d57300e.tar.gz
rust-4d5501037a39a3c58421a02c45aec31a1d57300e.zip
Allow long link names in tar files
Without this, users trying to run `x.py dist` under a sufficiently long
path run into problems when we build the resulting tarballs due to
length limits in the original tar spec. The error looks like:

        Finished release [optimized + debuginfo] target(s) in 0.34s
    Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-musl)
    Building stage0 tool rust-installer (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.35s
    Dist rust-std-1.67.1-x86_64-unknown-linux-musl
    Error: failed to generate installer

    Caused by:
        0: failed to tar file '/home/AAAAAAAAAAAAAA/BBBBBB/CCCC/DDD/EEEEE/FFFFFFFFFFFF/GGGGGGGGGGGGGGGG/HHHHHHHHHH/IIIIIIIIIIIIIII/JJJJJ/KKKKKKK/src/build/tmp/tarball/rust-std/x86_64-unknown-linux-musl/rust-std-1.67.1-x86_64-unknown-linux-musl/rust-std-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/libc.a'
        1: provided value is too long when setting link name for
    Build completed unsuccessfully in 0:00:03

The fix is to make use of the widely-supported GNU tar extensions which
lift this restriction. Switching to [`tar::Builder::append_link`] takes
care of that for us. See also alexcrichton/tar-rs#273.

[`tar::Builder::append_link`]: https://docs.rs/tar/0.4.38/tar/struct.Builder.html#method.append_link
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions