diff options
author | Partouf <partouf@gmail.com> | 2018-10-06 17:16:39 +0200 |
---|---|---|
committer | Partouf <partouf@gmail.com> | 2018-10-06 23:56:54 +0200 |
commit | ad1932ff63487760246affb7ad7a87b31f9934dc (patch) | |
tree | e3a583b929a3a773470a01c63e5ee8722207408d /lib/compilers/clean.js | |
parent | c3ca06250d6629dbe3122ec39bd8e586f3d73497 (diff) | |
download | compiler-explorer-ad1932ff63487760246affb7ad7a87b31f9934dc.tar.gz compiler-explorer-ad1932ff63487760246affb7ad7a87b31f9934dc.zip |
bintest
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'); |