aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/win32.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2020-01-21 22:36:23 -0600
committerMatt Godbolt <matt@godbolt.org>2020-01-21 22:36:23 -0600
commit6d2448064693cc766cc4e2e04ca2bff398a0bb02 (patch)
treec8e53d3e2a17e162b2bfdb8206a86d2392800e97 /lib/compilers/win32.js
parent6999f9b89ceab2b93ee38554d118630b87956ae2 (diff)
downloadcompiler-explorer-6d2448064693cc766cc4e2e04ca2bff398a0bb02.tar.gz
compiler-explorer-6d2448064693cc766cc4e2e04ca2bff398a0bb02.zip
win32 asyncify
Diffstat (limited to 'lib/compilers/win32.js')
-rw-r--r--lib/compilers/win32.js20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/compilers/win32.js b/lib/compilers/win32.js
index 840e3bd2c..5b9616cec 100644
--- a/lib/compilers/win32.js
+++ b/lib/compilers/win32.js
@@ -46,22 +46,20 @@ class Win32Compiler extends BaseCompiler {
return this.getOutputFilename(dirPath, outputFilebase) + ".exe";
}
- objdump(outputFilename, result, maxSize, intelAsm) {
+ async objdump(outputFilename, result, maxSize, intelAsm) {
const dirPath = path.dirname(outputFilename);
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, customCwd: dirPath})
- .then((objResult) => {
- if (objResult.code !== 0) {
- result.asm = "<No output: objdump returned " + objResult.code + ">";
- } else {
- result.asm = objResult.stdout;
- }
+ const objResult = await this.exec(this.compiler.objdumper, args, {maxOutput: 0, customCwd: dirPath});
+ if (objResult.code !== 0) {
+ result.asm = "<No output: objdump returned " + objResult.code + ">";
+ } else {
+ result.asm = objResult.stdout;
+ }
- return result;
- });
+ return result;
}
getSharedLibraryPathsAsArguments(libraries) {
@@ -146,7 +144,7 @@ class Win32Compiler extends BaseCompiler {
'/FA',
'/c',
'/Fa' + this.filename(outputFilename),
- '/Fo' + this.filename(outputFilename + '.obj'),
+ '/Fo' + this.filename(outputFilename + '.obj')
];
}
}