aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/ada.js
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2022-01-30 17:49:13 +0100
committerGitHub <noreply@github.com>2022-01-30 10:49:13 -0600
commitc4e76cd7a458c84c6599d226cceffc2f2694e47e (patch)
tree4a8ce667c0ba14675b58085f8b402c11c3db659d /lib/compilers/ada.js
parentc40bfa50f532474839eeeea50cd9f431a889d353 (diff)
downloadcompiler-explorer-c4e76cd7a458c84c6599d226cceffc2f2694e47e.tar.gz
compiler-explorer-c4e76cd7a458c84c6599d226cceffc2f2694e47e.zip
Add GNAT cross compiler from Alire project (#3294)gh-1774
Add new adarts compiler properties used to set the RTS (if needed) to be used by GNAT. This is needed as the cross compilers come with several RTS and you must provide one. Use Alire (https://alire.ada.dev/) cross compilers for ARM32 and RISC-V 64. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'lib/compilers/ada.js')
-rw-r--r--lib/compilers/ada.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/compilers/ada.js b/lib/compilers/ada.js
index 105ee8ae1..8219f9b35 100644
--- a/lib/compilers/ada.js
+++ b/lib/compilers/ada.js
@@ -123,6 +123,14 @@ export class AdaCompiler extends BaseCompiler {
for (let i = 0; i < options.length; i++) {
if (options[i] === '-cargs') {
options.splice(i, 0, inputFileName);
+
+ // If the compiler contains a RTS, add the extra --RTS=.
+ // FIXME: should probably check the user did not use one.
+ if (this.compiler.adarts) {
+ options.splice(i, 0,
+ `--RTS=${this.compiler.adarts}`,
+ );
+ }
break;
}
}