[lld] [lld][COFF][LTO] Implement /lldemit:asm option (PR #67079)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 03:46:28 PDT 2023


================
@@ -213,6 +221,8 @@ std::vector<InputFile *> BitcodeCompiler::compile() {
     pruneCache(ctx.config.ltoCache, ctx.config.ltoCachePolicy, files);
 
   std::vector<InputFile *> ret;
+  bool emitASM = ctx.config.emit == EmitKind::ASM;
+  const char *Ext = emitASM ? ".asm" : ".obj";
----------------
mstorsjo wrote:

That's definitely a separate MR, yeah.

For x86, I guess it could be possible to generate masm style assembly - for ARM, the MS tooling uses "armasm" style assembly, and I don't think we've got support for either generating or consuming that anywhere.

So before that, I'd say we'd go with just `.s` as we're dealing with GAS style assembly.

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


More information about the llvm-commits mailing list