[lld] r312626 - [ELF] Rewrite --symbol-ordering-file path in reproducer
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 03:10:50 PDT 2017
Author: jhenderson
Date: Wed Sep 6 03:10:49 2017
New Revision: 312626
URL: http://llvm.org/viewvc/llvm-project?rev=312626&view=rev
Log:
[ELF] Rewrite --symbol-ordering-file path in reproducer
The --symbol-ordering-file path was not being rewritten in the response file when
using --reproduce. This patch adds this to the list of switches that are rewritten,
so that the path is somewhere within the reproducer directory tree.
Reviewers: ruiu
Differential Revision: https://reviews.llvm.org/D37480
Modified:
lld/trunk/ELF/DriverUtils.cpp
lld/trunk/test/ELF/reproduce.s
Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=312626&r1=312625&r2=312626&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Wed Sep 6 03:10:49 2017
@@ -160,6 +160,7 @@ std::string elf::createResponseFile(cons
case OPT_library_path:
case OPT_rpath:
case OPT_script:
+ case OPT_symbol_ordering_file:
case OPT_version_script:
OS << Arg->getSpelling() << " " << quote(rewritePath(Arg->getValue()))
<< "\n";
Modified: lld/trunk/test/ELF/reproduce.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce.s?rev=312626&r1=312625&r2=312626&view=diff
==============================================================================
--- lld/trunk/test/ELF/reproduce.s (original)
+++ lld/trunk/test/ELF/reproduce.s Wed Sep 6 03:10:49 2017
@@ -33,10 +33,12 @@
# RUN: echo "{};" > dyn
# RUN: echo > file
# RUN: echo > file2
+# RUN: echo "_start" > order
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o 'foo bar'
# RUN: ld.lld --reproduce repro2.tar 'foo bar' -L"foo bar" -Lfile -Tfile2 \
-# RUN: --dynamic-list dyn -rpath file --script=file --version-script ver \
-# RUN: --dynamic-linker "some unusual/path" -soname 'foo bar' -soname='foo bar'
+# RUN: --dynamic-list dyn -rpath file --script=file --symbol-ordering-file order \
+# RUN: --version-script ver --dynamic-linker "some unusual/path" -soname 'foo bar' \
+# RUN: -soname='foo bar'
# RUN: tar xf repro2.tar
# RUN: FileCheck %s --check-prefix=RSP2 < repro2/response.txt
# RSP2: --chroot .
@@ -47,7 +49,8 @@
# RSP2-NEXT: --dynamic-list {{.+}}dyn
# RSP2-NEXT: -rpath {{.+}}file
# RSP2-NEXT: --script {{.+}}file
-# RSP2-NEXT: --version-script [[PATH:.*]]ver
+# RSP2-NEXT: --symbol-ordering-file [[PATH:.+]]order
+# RSP2-NEXT: --version-script [[PATH]]ver
# RSP2-NEXT: --dynamic-linker "some unusual/path"
# RSP2-NEXT: -soname "foo bar"
# RSP2-NEXT: -soname "foo bar"
@@ -55,6 +58,7 @@
# RUN: tar tf repro2.tar | FileCheck %s
# CHECK: repro2/response.txt
# CHECK-NEXT: repro2/version.txt
+# CHECK-NEXT: repro2/{{.*}}/order
# CHECK-NEXT: repro2/{{.*}}/dyn
# CHECK-NEXT: repro2/{{.*}}/ver
# CHECK-NEXT: repro2/{{.*}}/foo bar
More information about the llvm-commits
mailing list