From 4521f706bae7aed3e8d01ee39239f7b1f467c3a1 Mon Sep 17 00:00:00 2001 From: partouf Date: Sat, 14 Jan 2023 15:37:09 +0100 Subject: [PATCH] customizable interpret execute params, customizable compilationoptions --- lib/base-compiler.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/base-compiler.ts b/lib/base-compiler.ts index 494f77f91..a71587ae9 100644 --- a/lib/base-compiler.ts +++ b/lib/base-compiler.ts @@ -1593,6 +1593,10 @@ export class BaseCompiler implements ICompiler { return this.execBinary(executable, maxExecOutputSize, executeParameters, homeDir); } + protected fixExecuteParametersForInterpreting(executeParameters, outputFilename, key) { + executeParameters.args.unshift(outputFilename); + } + async handleInterpreting(key, executeParameters): Promise { const source = key.source; const dirPath = await this.newTempDir(); @@ -1606,7 +1610,7 @@ export class BaseCompiler implements ICompiler { await this.writeMultipleFiles(key.files, dirPath); } - executeParameters.args.unshift(outputFilename); + this.fixExecuteParametersForInterpreting(executeParameters, outputFilename, key); const result = await this.runExecutable(this.compiler.exe, executeParameters, dirPath); return { @@ -1819,7 +1823,7 @@ export class BaseCompiler implements ICompiler { : ''; asmResult.dirPath = dirPath; - asmResult.compilationOptions = options; + if (!asmResult.compilationOptions) asmResult.compilationOptions = options; asmResult.downloads = downloads; // Here before the check to ensure dump reports even on failure cases if (this.compiler.supportsGccDump && gccDumpResult) {