customizable interpret execute params, customizable compilationoptions

This commit is contained in:
partouf
2023-01-14 15:37:09 +01:00
parent 54227dea8d
commit 4521f706ba

View File

@@ -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<CompilationResult> {
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) {