Don't include the output dir in the response file.

With this it is possible to use chroot/fakechroot to have a completely
reproducible link even when thin archives or linker scripts have
absolute paths.

llvm-svn: 268231
This commit is contained in:
Rafael Espindola 2016-05-02 14:12:35 +00:00
parent 5f0e96e56a
commit e85bcbd1c3
2 changed files with 3 additions and 2 deletions

View File

@ -139,7 +139,7 @@ static std::string quote(StringRef S) {
static std::string rewritePath(StringRef S) {
if (fs::exists(S))
return getDestPath(S);
return relativeToRoot(S);
return S;
}

View File

@ -9,7 +9,8 @@
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
# RSP: {{^}}--hash-style gnu{{$}}
# RSP-NEXT: {{.*}}foo.o
# RSP-NOT: repro/
# RSP-NEXT: /foo.o
# RSP-NEXT: -o bar
# RSP-NEXT: -shared
# RSP-NEXT: --as-needed