Move the asm join from runCompiler to postProcess, and the IR join to
processIrOutput. runCompiler is called from both the main compile and
generateIR, which run concurrently in one Promise.all, so the previous version
had two invocations writing the same output.s and output.ll. Both hooks now run
once, and postProcess is handed the caller's own outputFilename, so a request
setting backendOptions.customOutputFilename is honoured rather than silently
producing no output.
postProcess has to refresh result.asmSize: checkOutputFileAndDoPostProcess sizes
the output before calling it, which is before the joined file exists, and
BaseCompiler reports "<No output file>" whenever asmSize is undefined.
Blank comments and raw strings before looking for module declarations, so a
commented-out `module std::io;` doesn't have us serve several megabytes of
standard library assembly. Newlines are preserved so the line anchors still fit.
Derive the fallback module name the way c3c does, replacing non-word characters,
so my-file.c3 maps to my_file.s.
Label the chunks when several modules are emitted, using the right comment
character for asm and IR. Single-module output, the common case, is unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>