Skip to content

ld64.lld --reproduce produces confusing tar file if -Lnonexistent-dir is passed #62786

Open
@nico

Description

@nico
cd /tmp
mkdir foo
cd foo
cat > main.c
echo 'int main() {}' > main.c
mkdir foo
 ~/src/llvm-project/out/gn/bin/clang main.c -fuse-ld=lld -isysroot $(xcrun -show-sdk-path) -Wl,--reproduce=repro.tar -Lfoo -Wl,-fatal_warnings
open repro.tar
cd repro
~/src/llvm-project/out/gn/bin/ld64.lld @response.txt
ld64.lld: error: directory not found for option -Ltmp/foo/foo

Looks like we don't include empty directories in the tar for unused -L flags.

(Looks like ld.lld doesn't warn about -L flags pointing to nonexistent dirs, so it doesn't have this problem)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions