[lld] [lld][COFF][LTO] Implement /opt:emitllvm option (PR #66964)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 02:26:24 PDT 2023


================
@@ -1822,6 +1822,8 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
         ltoDebugPM = true;
       } else if (s == "noltodebugpassmanager") {
         ltoDebugPM = false;
+      } else if (s == "emitllvm") {
----------------
mstorsjo wrote:

I'd defer to @rnk or someone else about whether `/opt:emitllvm` is the most natural/idiomatic way of setting an option like this on the `link.exe` like interface? AFAIK the `/opt:` namespace is for configuring optimizations, right? We have a bunch of other lld-link specific options either named plain `/customoption` or `/lldcustomoption`.

Secondly, while working on this, would you consider adding `emit-asm` in some form as well?

https://github.com/llvm/llvm-project/pull/66964


More information about the llvm-commits mailing list