diff options
Diffstat (limited to 'lib/compilers/ada.ts')
-rw-r--r-- | lib/compilers/ada.ts | 15 |
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'); |