aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/ada.js
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2021-11-16 21:09:18 +0100
committerGitHub <noreply@github.com>2021-11-16 21:09:18 +0100
commit88d58f9fe2da9c911f55c4de9d9b8659e0eb7bea (patch)
tree5e5c7ae8c6cda86b453a5f888147c79bbabc4ceb /lib/compilers/ada.js
parent19159930b50f0d03009bdda4ebffce8effe1b7a3 (diff)
downloadcompiler-explorer-88d58f9fe2da9c911f55c4de9d9b8659e0eb7bea.tar.gz
compiler-explorer-88d58f9fe2da9c911f55c4de9d9b8659e0eb7bea.zip
Refactor GCC dump and GNAT expanded code creation (#3064)gh-1262
Instead of having a dedicated invocation of the compilers, inject needed options in the main compilation command and do everything in one run. This should fix GNAT race condition on ALI file, save some CPU time and make the latency a bit better. This can work as long as everything can really be done in one run (eg. no incompatible options, no clash on stdout/stderr). Add optionsForBackend in base compiler class that is meant to be overloaded by compilers for injecting options based on current backend options. Use it for GCC dumps (BaseCompiler) and GNAT expanded code. Fixes #3041 References #3029 Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'lib/compilers/ada.js')
-rw-r--r--lib/compilers/ada.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compilers/ada.js b/lib/compilers/ada.js
index 971564edb..9a6fea6f8 100644
--- a/lib/compilers/ada.js
+++ b/lib/compilers/ada.js
@@ -46,6 +46,16 @@ export class AdaCompiler extends BaseCompiler {
return path.join(dirPath, 'example.o');
}
+ optionsForBackend(backendOptions){
+ // super is needed as it handles the GCC Dump files.
+ const opts = super.optionsForBackend (backendOptions);
+
+ if (backendOptions.produceGnatDebug && this.compiler.supportsGnatDebugView)
+ opts.push('-gnatDGL');
+
+ return opts;
+ }
+
optionsForFilter(filters, outputFilename) {
let options = [];