diff options
author | Partouf <partouf@gmail.com> | 2018-11-05 14:24:52 +0100 |
---|---|---|
committer | Partouf <partouf@gmail.com> | 2018-11-06 12:56:36 +0100 |
commit | 2a6e10ccb5d281f1fb606a524d67a9044e119605 (patch) | |
tree | 4131b1860771dad99bef14154a6d1f708c1d1bca /lib/compilers/pascal.js | |
parent | ad98a4895bb9b824be2a7fb910016b3ecc0cc29e (diff) | |
download | compiler-explorer-2a6e10ccb5d281f1fb606a524d67a9044e119605.tar.gz compiler-explorer-2a6e10ccb5d281f1fb606a524d67a9044e119605.zip |
attempt at seperating compilation and execution
Diffstat (limited to 'lib/compilers/pascal.js')
-rw-r--r-- | lib/compilers/pascal.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/compilers/pascal.js b/lib/compilers/pascal.js index 19ada7285..5af3bf8ef 100644 --- a/lib/compilers/pascal.js +++ b/lib/compilers/pascal.js @@ -74,6 +74,10 @@ class FPCCompiler extends BaseCompiler { return path.join(dirPath, `${path.basename(this.compileFilename, this.lang.extensions[0])}.s`); } + getExecutableFilename(dirPath) { + return path.join(dirPath, "prog"); + } + static preProcessBinaryAsm(input) { const relevantAsmStartsAt = input.indexOf("<OUTPUT"); if (relevantAsmStartsAt !== -1) { @@ -92,7 +96,7 @@ class FPCCompiler extends BaseCompiler { } objdump(outputFilename, result, maxSize, intelAsm, demangle) { - outputFilename = path.join(path.dirname(outputFilename), "prog"); + outputFilename = this.getExecutableFilename(path.dirname(outputFilename)); let args = ["-d", outputFilename, "-l", "--insn-width=16"]; if (demangle) args = args.concat(["-C"]); if (intelAsm) args = args.concat(["-M", "intel"]); @@ -148,7 +152,7 @@ class FPCCompiler extends BaseCompiler { execBinary(executable, result, maxSize) { executable = path.join(path.dirname(executable), "prog"); - super.execBinary(executable, result, maxSize); + return super.execBinary(executable, result, maxSize); } getArgumentParser() { |