diff options
Diffstat (limited to 'lib/compilers/clean.js')
-rw-r--r-- | lib/compilers/clean.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/compilers/clean.js b/lib/compilers/clean.js index ca5c699a3..654ce4cd3 100644 --- a/lib/compilers/clean.js +++ b/lib/compilers/clean.js @@ -41,6 +41,21 @@ class CleanCompiler extends BaseCompiler { return path.join(dirPath, "Clean System Files/example.s"); } + objdump(outputFilename, result, maxSize, intelAsm, demangle) { + logger.info(outputFilename); + let args = ["-d", outputFilename, "-l", "--insn-width=16"]; + if (demangle) args = args.concat("-C"); + if (intelAsm) args = args.concat(["-M", "intel"]); + return this.exec(this.compiler.objdumper, args, {maxOutput: maxSize}) + .then(objResult => { + result.asm = objResult.stdout; + if (objResult.code !== 0) { + result.asm = `<No output: objdump returned ${objResult.code}>`; + } + return result; + }); + } + runCompiler(compiler, options, inputFilename, execOptions) { const tmpDir = path.dirname(inputFilename); const moduleName = path.basename(inputFilename, '.icl'); |