diff options
author | Partouf <partouf@gmail.com> | 2018-11-08 17:39:28 +0100 |
---|---|---|
committer | Partouf <partouf@gmail.com> | 2018-11-08 17:39:28 +0100 |
commit | ae47e2b40a305cf32e160b7581e581dda8f199e6 (patch) | |
tree | 9b395b77cf77c9b632b553e5eedf85928d440214 /lib/compilers/win32.js | |
parent | b796fc79028e0312cd6d472f14b85e3b537eb979 (diff) | |
download | compiler-explorer-ae47e2b40a305cf32e160b7581e581dda8f199e6.tar.gz compiler-explorer-ae47e2b40a305cf32e160b7581e581dda8f199e6.zip |
lint- and bugfixes
Diffstat (limited to 'lib/compilers/win32.js')
-rw-r--r-- | lib/compilers/win32.js | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/lib/compilers/win32.js b/lib/compilers/win32.js index 6268bb329..5768f0afd 100644 --- a/lib/compilers/win32.js +++ b/lib/compilers/win32.js @@ -26,6 +26,7 @@ const BaseCompiler = require('../base-compiler'), temp = require('temp'), + path = require('path'), PELabelReconstructor = require("../pe32-support").labelReconstructor; class Win32Compiler extends BaseCompiler { @@ -44,21 +45,25 @@ class Win32Compiler extends BaseCompiler { return true; } - objdump(outputFilename, result, maxSize, intelAsm, demangle) { - outputFilename = outputFilename + '.exe'; + getExecutableFilename(dirPath, outputFilebase) { + return this.getOutputFilename(dirPath, outputFilebase) + ".exe"; + } + + objdump(outputFilename, result, maxSize, intelAsm) { + outputFilename = this.getExecutableFilename(path.dirname(outputFilename), "output"); let args = ["-d", outputFilename]; if (intelAsm) args = args.concat(["-M", "intel"]); return this.exec(this.compiler.objdumper, args, {maxOutput: 0}) - .then((objResult) => { - if (objResult.code !== 0) { - result.asm = "<No output: objdump returned " + objResult.code + ">"; - } else { - result.asm = objResult.stdout; - } - - return result; - }); + .then((objResult) => { + if (objResult.code !== 0) { + result.asm = "<No output: objdump returned " + objResult.code + ">"; + } else { + result.asm = objResult.stdout; + } + + return result; + }); } optionsForFilter(filters, outputFilename) { @@ -78,7 +83,7 @@ class Win32Compiler extends BaseCompiler { '/Fa' + this.filename(outputFilename), '/Fo' + this.filename(outputFilename + '.obj'), '/Fm' + this.filename(mapFilename), - '/Fe' + this.filename(outputFilename + '.exe') + '/Fe' + this.filename(this.getExecutableFilename(path.dirname(outputFilename), "output")) ]; } else { return [ |