[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:26 PDT 2023
================
@@ -235,20 +245,21 @@ std::vector<InputFile *> BitcodeCompiler::compile() {
if (bitcodeFilePath == "ld-temp.o") {
ltoObjName =
saver().save(Twine(ctx.config.outputFile) + ".lto" +
- (i == 0 ? Twine("") : Twine('.') + Twine(i)) + ".obj");
+ (i == 0 ? Twine("") : Twine('.') + Twine(i)) + Ext);
} else {
StringRef directory = sys::path::parent_path(bitcodeFilePath);
- StringRef baseName = sys::path::filename(bitcodeFilePath);
+ StringRef baseName = sys::path::stem(bitcodeFilePath);
StringRef outputFileBaseName = sys::path::filename(ctx.config.outputFile);
SmallString<64> path;
sys::path::append(path, directory,
- outputFileBaseName + ".lto." + baseName);
+ outputFileBaseName + ".lto." + baseName + Ext);
sys::path::remove_dots(path, true);
ltoObjName = saver().save(path.str());
}
- if (ctx.config.saveTemps)
+ if (ctx.config.saveTemps || emitASM)
----------------
mstorsjo wrote:
Ah, I see - this particular change from the previous commit takes care of it.
```diff
- if (config->thinLTOIndexOnly)
+ // Likewise, don't emit object files for other /lldemit options.
+ if (config->emit != EmitKind::Obj || config->thinLTOIndexOnly)
return;
```
So that's why I didn't see anything relating to that in this PR.
https://github.com/llvm/llvm-project/pull/67079
More information about the llvm-commits
mailing list