aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/dmd.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2019-05-15 12:03:36 -0500
committerMatt Godbolt <matt@godbolt.org>2019-05-15 12:03:36 -0500
commit8807b6ae7bb1c5c0f233937a9b16fc9d9b81eff4 (patch)
tree6d37b587d29f1d7b6a367ed2a1b7beb34b0ffabb /lib/compilers/dmd.js
parentef260168ab75aa8eaf8dc54bc1938a41259c9cf9 (diff)
downloadcompiler-explorer-8807b6ae7bb1c5c0f233937a9b16fc9d9b81eff4.tar.gz
compiler-explorer-8807b6ae7bb1c5c0f233937a9b16fc9d9b81eff4.zip
Ensure objdump runs in the right directory
Diffstat (limited to 'lib/compilers/dmd.js')
-rw-r--r--lib/compilers/dmd.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compilers/dmd.js b/lib/compilers/dmd.js
index 62ef2de4a..8ee342277 100644
--- a/lib/compilers/dmd.js
+++ b/lib/compilers/dmd.js
@@ -52,10 +52,11 @@ class DMDCompiler extends BaseCompiler {
}
objdump(outputFilename, result, maxSize, intelAsm, demangle) {
+ const dirPath = path.dirname(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})
+ return this.exec(this.compiler.objdumper, args, {maxOutput: maxSize, customCwd: dirPath})
.then(objResult => {
result.asm = objResult.stdout;
if (objResult.code !== 0) {