os << quote(rewritePath(arg->getValue())) << "\n";
break;
case OPT_o:
- // If -o path contains directories, "lld @response.txt" will likely
- // fail because the archive we are creating doesn't contain empty
+ case OPT_Map:
+ // If an output path contains directories, "lld @response.txt" will
+ // likely fail because the archive we are creating doesn't contain empty
// directories for the output path (-o doesn't create directories).
// Strip directories to prevent the issue.
- os << "-o " << quote(path::filename(arg->getValue())) << "\n";
+ os << arg->getSpelling() << ' ' << quote(path::filename(arg->getValue()))
+ << "\n";
break;
case OPT_lto_sample_profile:
os << arg->getSpelling() << quote(rewritePath(arg->getValue())) << "\n";
## 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 -shared --as-needed --reproduce=repro4.tar
+# RUN: ld.lld build1/foo.o -o build4/a/b/c/bar -Map build4/a/b/c/map -shared --as-needed --reproduce=repro4.tar
# RUN: tar xOf repro4.tar repro4/response.txt | FileCheck %s --check-prefix=RSP4
# RSP4: -o bar
+# RSP4: -Map map
.globl _start
_start: