[lld] 6aeffa1 - [ELF] --reproduce: strip directories for --dependency-file=
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 24 17:23:58 PST 2024
Author: Fangrui Song
Date: 2024-11-24T17:23:52-08:00
New Revision: 6aeffa18e9ac51b7090325ea50d1841248a876c6
URL: https://github.com/llvm/llvm-project/commit/6aeffa18e9ac51b7090325ea50d1841248a876c6
DIFF: https://github.com/llvm/llvm-project/commit/6aeffa18e9ac51b7090325ea50d1841248a876c6.diff
LOG: [ELF] --reproduce: strip directories for --dependency-file=
CMake may generate build.ninja with DEP_FILE specifying a non-existent
directory in the reproduce tarball.
Added:
Modified:
lld/ELF/DriverUtils.cpp
lld/test/ELF/reproduce.s
Removed:
################################################################################
diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp
index 0278c070b24734..4c88723f090d08 100644
--- a/lld/ELF/DriverUtils.cpp
+++ b/lld/ELF/DriverUtils.cpp
@@ -174,6 +174,7 @@ std::string elf::createResponseFile(const opt::InputArgList &args) {
break;
case OPT_o:
case OPT_Map:
+ case OPT_dependency_file:
case OPT_print_archive_stats:
case OPT_why_extract:
// If an output path contains directories, "lld @response.txt" will
diff --git a/lld/test/ELF/reproduce.s b/lld/test/ELF/reproduce.s
index 8818a9e35f4039..29dc109d5a4126 100644
--- a/lld/test/ELF/reproduce.s
+++ b/lld/test/ELF/reproduce.s
@@ -76,11 +76,12 @@
## Check that directory path is stripped from -o <file-path>
# RUN: mkdir -p %t.dir/build4/a/b/c
# RUN: cd %t.dir
-# RUN: ld.lld build1/foo.o -o build4/a/b/c/bar -Map build4/map --print-archive-stats=build4/stats \
+# RUN: ld.lld build1/foo.o -o build4/a/b/c/bar -Map build4/map --dependency-file=build4/bar.d --print-archive-stats=build4/stats \
# RUN: --why-extract=build4/why -shared --as-needed --reproduce=repro4.tar
# RUN: tar xOf repro4.tar repro4/response.txt | FileCheck %s --check-prefix=RSP4
# RSP4: -o bar
# RSP4-NEXT: -Map map
+# RSP4-NEXT: --dependency-file bar.d
# RSP4-NEXT: --print-archive-stats=stats
# RSP4-NEXT: --why-extract=why
More information about the llvm-commits
mailing list