[PATCH] D101182: [lld/mac] Support more flags for --reproduce
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 23 11:50:34 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa61891d491bd: [lld/mac] Support more flags for --reproduce (authored by thakis).
Herald added a project: LLVM.
Changed prior to commit:
https://reviews.llvm.org/D101182?vs=340090&id=340127#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101182/new/
https://reviews.llvm.org/D101182
Files:
lld/MachO/DriverUtils.cpp
lld/test/MachO/reproduce.s
Index: lld/test/MachO/reproduce.s
===================================================================
--- lld/test/MachO/reproduce.s
+++ lld/test/MachO/reproduce.s
@@ -3,35 +3,46 @@
# RUN: rm -rf %t.dir
# RUN: mkdir -p %t.dir/build1
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %s -o %t.dir/build1/foo.o
+# RUN: echo '_main' > %t.dir/main.exports
# RUN: cd %t.dir
-# RUN: %lld -platform_version macos 10.10.0 11.0 build1/foo.o -o bar --reproduce repro1.tar
-# RUN: tar xOf repro1.tar repro1/%:t.dir/build1/foo.o > build1-foo.o
-# RUN: cmp build1/foo.o build1-foo.o
+# RUN: %lld -platform_version macos 10.10.0 11.0 \
+# RUN: -exported_symbols_list main.exports \
+# RUN: build1/foo.o -o bar --reproduce repro1.tar
-# RUN: tar xf repro1.tar repro1/response.txt repro1/version.txt
+# RUN: tar tf repro1.tar | FileCheck -DPATH='%:t.dir' --check-prefix=LIST %s
+# LIST: repro1/response.txt
+# LIST: [[PATH]]/main.exports
+# LIST: [[PATH]]/build1/foo.o
+
+# RUN: tar xf repro1.tar
+# RUN: cmp build1/foo.o repro1/%:t.dir/build1/foo.o
+# RUN: diff main.exports repro1/%:t.dir/main.exports
# RUN: FileCheck %s --check-prefix=RSP1 < repro1/response.txt
# RSP1: {{^}}-platform_version macos 10.10.0 11.0{{$}}
+# RSP1-NEXT: -exported_symbols_list [[BASEDIR:.+]]/main.exports
# RSP1-NOT: {{^}}repro1{{[/\\]}}
-# RSP1-NEXT: {{[/\\]}}foo.o
+# RSP1-NEXT: [[BASEDIR]]/build1/foo.o
# RSP1-NEXT: -o bar
# RSP1-NOT: --reproduce
# RUN: FileCheck %s --check-prefix=VERSION < repro1/version.txt
# VERSION: LLD
+# RUN: cd repro1; ld64.lld @response.txt
+
# RUN: mkdir -p %t.dir/build2/a/b/c
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %s -o %t.dir/build2/foo.o
# RUN: cd %t.dir/build2/a/b/c
# RUN: echo ./../../../foo.o > %t.dir/build2/filelist
# RUN: env LLD_REPRODUCE=repro2.tar %lld -filelist %t.dir/build2/filelist -o /dev/null
-# RUN: tar xOf repro2.tar repro2/%:t.dir/build2/foo.o > build2-foo.o
-# RUN: cmp %t.dir/build2/foo.o build2-foo.o
-
-# RUN: tar xf repro2.tar repro2/response.txt repro2/version.txt
+# RUN: tar xf repro2.tar
+# RUN: cmp %t.dir/build2/foo.o repro2/%:t.dir/build2/foo.o
# RUN: FileCheck %s --check-prefix=RSP2 < repro2/response.txt
# RSP2-NOT: {{^}}repro2{{[/\\]}}
# RSP2: {{[/\\]}}foo.o
+# RUN: cd repro2; ld64.lld @response.txt
+
.globl _main
_main:
ret
Index: lld/MachO/DriverUtils.cpp
===================================================================
--- lld/MachO/DriverUtils.cpp
+++ lld/MachO/DriverUtils.cpp
@@ -140,12 +140,15 @@
for (StringRef path : args::getLines(*buffer))
os << quote(rewritePath(path)) << "\n";
break;
- case OPT_force_load:
- case OPT_rpath:
- case OPT_syslibroot:
case OPT_F:
case OPT_L:
+ case OPT_bundle_loader:
+ case OPT_exported_symbols_list:
+ case OPT_force_load:
case OPT_order_file:
+ case OPT_rpath:
+ case OPT_syslibroot:
+ case OPT_unexported_symbols_list:
os << arg->getSpelling() << " " << quote(rewritePath(arg->getValue()))
<< "\n";
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101182.340127.patch
Type: text/x-patch
Size: 3066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/501c1c0f/attachment.bin>
More information about the llvm-commits
mailing list