aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/ada.ts
diff options
context:
space:
mode:
authornickpdemarco <nickpdemarco@gmail.com>2023-10-11 14:43:05 -0400
committernickpdemarco <nickpdemarco@gmail.com>2023-10-11 14:43:05 -0400
commit9cda199e40c920fcc9c53082b0dabb17d31a8b7f (patch)
treea4e9a03a9feea17376f5990e19c12818d32ec95e /lib/compilers/ada.ts
parent55a2b1455f823026c78b9219f93799af00ef60ae (diff)
parent10796b3696cf1eef928de8c750b4d3350ee0c2db (diff)
downloadcompiler-explorer-9cda199e40c920fcc9c53082b0dabb17d31a8b7f.tar.gz
compiler-explorer-9cda199e40c920fcc9c53082b0dabb17d31a8b7f.zip
Merge main, resolve conflicts with vala
Diffstat (limited to 'lib/compilers/ada.ts')
-rw-r--r--lib/compilers/ada.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/compilers/ada.ts b/lib/compilers/ada.ts
index be8434596..a379449ea 100644
--- a/lib/compilers/ada.ts
+++ b/lib/compilers/ada.ts
@@ -24,11 +24,13 @@
// POSSIBILITY OF SUCH DAMAGE.
import path from 'path';
+import {unwrap} from '../assert.js';
import type {PreliminaryCompilerInfo} from '../../types/compiler.interfaces.js';
import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
import {BaseCompiler} from '../base-compiler.js';
import * as utils from '../utils.js';
+import type {ConfiguredOverrides} from '../../types/compilation/compiler-overrides.interfaces.js';
export class AdaCompiler extends BaseCompiler {
static get key() {
@@ -37,9 +39,17 @@ export class AdaCompiler extends BaseCompiler {
constructor(info: PreliminaryCompilerInfo, env) {
super(info, env);
+
+ this.outputFilebase = 'example';
+
this.compiler.supportsGccDump = true;
this.compiler.removeEmptyGccDump = true;
+ // this is not showing-up in the --help, so argument parser doesn't
+ // automatically detect the support.
+ this.compiler.stackUsageArg = '-fstack-usage';
+ this.compiler.supportsStackUsageOutput = true;
+
// used for all GNAT related panes (Expanded code, Tree)
this.compiler.supportsGnatDebugViews = true;
}
@@ -76,6 +86,7 @@ export class AdaCompiler extends BaseCompiler {
inputFilename: string,
outputFilename: string,
libraries,
+ overrides: ConfiguredOverrides,
) {
backendOptions = backendOptions || {};
@@ -99,6 +110,10 @@ export class AdaCompiler extends BaseCompiler {
gnatmake_opts.push(`--RTS=${this.compiler.adarts}`);
}
+ if (this.compiler.supportsStackUsageOutput && backendOptions.produceStackUsageInfo) {
+ gnatmake_opts.push(unwrap(this.compiler.stackUsageArg));
+ }
+
if (!filters.execute && backendOptions.produceGnatDebug && this.compiler.supportsGnatDebugViews)
// This is using stdout
gnatmake_opts.push('-gnatGL');