Skip to content

Commit 8b228ff

Browse files
committed
More ada fixes
1 parent b5b8482 commit 8b228ff

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

etc/config/ada.amazon.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ compilerType=ada
1212
###############################
1313
# GCC (as in GNU Compiler Collection) for x86
1414
group.gnat.compilers=gnat82:gnatsnapshot
15-
group.gnat.baseName=GNAT x86-64
15+
group.gnat.groupName=GNAT x86-64
16+
group.gnat.isSemVer=true
17+
group.gnat.baseName=x86-64 gnat
1618
compiler.gnat82.exe=/opt/compiler-explorer/gcc-8.2.0/bin/gnat
1719
compiler.gnat82.semver=8.2
1820
compiler.gnatsnapshot.exe=/opt/compiler-explorer/gcc-snapshot/bin/gnat
1921
compiler.gnatsnapshot.name=x86-64 gnat (trunk)
22+
compiler.gnatsnapshot.semver=(trunk)
2023

2124
#################################
2225
#################################

lib/compilers/ada.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class AdaCompiler extends BaseCompiler {
5757
// this however restricts users from including standard library packages, as
5858
// Ada mandates that 'with' clauses are placed in the context clause,
5959
// which in the case of a single subprogram is outside of its declaration and body.
60-
preProcess(source){
60+
preProcess(source) {
6161
return source;
6262
}
6363

@@ -72,17 +72,19 @@ class AdaCompiler extends BaseCompiler {
7272
// output as 'output.s' and not end up with 'example.s'. If the output is left
7373
// as 'example.s' CE can't find it and thus you get no output.
7474
let inputFileName = options.pop();
75-
for(let i = 0; i < options.length; i++){
76-
if(options[i] === '-cargs'){
77-
options.splice(i,0,inputFileName);
75+
for (let i = 0; i < options.length; i++) {
76+
if (options[i] === '-cargs') {
77+
options.splice(i, 0, inputFileName);
7878
break;
7979
}
8080
}
81-
const result = this.exec(compiler, options, execOptions);
82-
result.inputFilename = inputFilename;
83-
result.stdout = utils.parseOutput(result.stdout, inputFilename);
84-
result.stderr = utils.parseOutput(result.stderr, inputFilename);
85-
return result;
81+
return this.exec(compiler, options, execOptions)
82+
.then(result => {
83+
result.inputFilename = inputFilename;
84+
result.stdout = utils.parseOutput(result.stdout, inputFilename);
85+
result.stderr = utils.parseOutput(result.stderr, inputFilename);
86+
return result;
87+
});
8688
}
8789
}
8890

0 commit comments

Comments
 (0)