[lld] [lld][COFF][LTO] Implement /lldemit:asm option (PR #67079)
Matheus Izvekov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 03:52:51 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)
----------------
mizvekov wrote:
Correct!
https://github.com/llvm/llvm-project/pull/67079
More information about the llvm-commits
mailing list