[PATCH] D29526: Add an option to use the MSVC linker to link LTO-generated object files.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 11:40:17 PST 2017


ruiu added inline comments.


================
Comment at: lld/COFF/DriverUtils.cpp:658
+    case OPT_msvclto:
+      // LLD-specific options are stripped.
+      break;
----------------
pcc wrote:
> ruiu wrote:
> > pcc wrote:
> > > What about `/opt:lld*`?
> > lldmap and lldmap_file are only options that start with lld in COFF.
> I was referring to `/opt:lldlto=N`, `/opt:lldltojobs=N` and `/opt:lldltopartitions=N`.
Ah. We should skip these options too. Done.


================
Comment at: lld/test/COFF/msvclto.ll:3
+; RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %t2.obj %p/Inputs/msvclto.s
+; RUN: not lld-link %t1.obj %t2.obj /msvclto /out:%t.exe /entry:main /verbose \
+; RUN:   /subsystem:console > %t.log 2>&1
----------------
pcc wrote:
> Why do you have "not" here? I'd expect this to succeed on Windows.
We only need to verify the command line arguments passed to MSVC, so I added `|| true` to make this line always succeed.


https://reviews.llvm.org/D29526





More information about the llvm-commits mailing list