The property was incorrectly hardcoded in the AdaCompiler class.
As GNAT does not have an argument-parser, we can't rely on autodetecting the
-masm support. The easiest way is to simply define the intelAsm property for
GNAT compilers known to support it.
Fixes#3310
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
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>
Add some comments around the command line options handling of GNAT.
Add strings tool for Ada.
Also enable binary and execution in the default config.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
* Fix source/assembly mapping when GNAT expanded code pane opened
Using -gnatDGL to get the expanded code also asks GNAT to emit debug
informations pointing to the .dg file containing the expanded code, breaking CE
that is using these info to map assembly and source lines. Using -gnatGL instead
avoids the breaking of asm/source mapping but emits the expanded code in stdout
instead of a plain file.
This change replaces -gnatDGL by -gnatGL and extracts the expanded code from
stdout.
fixes#3171
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
* fixup! Fix source/assembly mapping when GNAT expanded code pane opened
Small refactoring for handling -Zunpretty calls:
- reuse options from main compiler invocation instead of crafting new ones.
- factor out common part.
Now also handles HIR output in a dedicated pane.
Still a lot of copy/pasting from the macro expansion.
fixes#2567
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Fixes the problem where any (reasonable) Kotlin JVM execution would fail with a NoClassDefFound error with kotlin.jvm.internal.Intrinsics.
The Kotlin execution is now packed into a jar with the Kotlin Standard Library and executed with java -jar.
For Erlang, format the output in the same way as the 'S' option
does. To achieve this, we use the `beam_listing` module, which is
undocumented but has been stable for many many years.
Conflicting changes in #3109 and #3064 left the GCC dump of rustc broken.
Reapplied the changes and refactored how the -fdump-foo-pass= option is crafted.
Instead of using stdout, use an explicit file. Beware that this won't work with
older GCC version. Regular GCC is still using the 'dump all files' instead of
the targeted option, so it's not impacted by this limitation. Only rustc-cg-gcc
is currently using this mecanism and it's using a recent libgccjit.
Really fixes#2868
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Trivial linter error:
```
compiler-explorer/lib/compilers/erlang.js
65:1 warning More than 1 blank line not allowed no-multiple-empty-lines
✖ 1 problem (0 errors, 1 warning)
0 errors and 1 warning potentially fixable with the `--fix` option.
```
* add support for erlang to beam bytecode
* changed call by 'this' to overridden functions
* Update base-compiler.js
Co-authored-by: Patrick Quist <partouf@gmail.com>
Beware that the way it is working causes several dump files to be empty. The
list of potential files is based on `-fdump-passes` output, but during the
actual compilation, some passes may or may not emit something (eg. a passe may
not be executed at all because it's not applicable). The drop down list will
contain some dump names that will simply display message like:
Pass 'cselim (tree)' was requested
but nothing was dumped. Possible causes are:
- pass is not valid in this (maybe you changed the compiler options);
- pass is valid but did not emit anything (eg. it was not executed).
This is expected and until someone has a better idea, this will be the case :)
fixes: #2868
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
* Honor compiler flags in rustc MIR output view
* Refactor rustc/MIR execution handling
Apply the same receipe as for GNAT and GCC for minimizing the number of
executions for getting extra outputs (here MIR).
After discussions in #3107, the way the output files are created is also
changed to use the syntax `--emit KIND=PATH` (see
https://doc.bccnsoft.com/docs/rust-1.36.0-docs-html/rustc/command-line-arguments.html)
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
* fixup! Refactor rustc/MIR execution handling
Co-authored-by: Nico Lehmann <nico.lehmannm@gmail.com>
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>
This change allows for only dumping a single pass (the one selected). In order
to populate the list of available dumps, it now queries GCC for the enabled
passes.
It can still be misleading to users as a pass can be enabled but for some reason
does not dump anything. In order to avoid this, the only solution seems to be to
still dump all files and filter the list... This defeats the initial goal and
only adds complexity for the current compilers.
But this makes #2868 easier to implement (see #2985 that was a aborted first
attempt) and if someday another libgccjit-based compiler is added, it could be
easily hooked to this.
It also changes the naming in the drop down menu. For example, instead of :
'009t.omplower' it now uses 'omplower (tree)' (ie.
'<pass-name> (tree|ipa|rtl)').
Fixes#3014
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
* Await for things
We had a number of things that aren't await()ing their promises.
That led to non-deterministic compiler settings like Intel support.
I used the IDE to find them all and fix the ones that I thought looked
important.
More generally we should use tslint (once we're all typescript) to
ensure this more generally. I tried the eslint equivalent but it
either overreacted or didn't catch anything.
Closes#3085
This change only gets the GNAT Debug expanded generated code (-gnatD).
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Mats Larsen <me@supergrecko.com>
* Enable GCC dump for the GNAT Ada compiler
GNAT is part of GCC and can handle the regular GCC options for dump files.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
* Add support for generating SPIR-V assembly from OpenCL C and C++ for OpenCL
* Update cpp_for_opencl.amazon.properties
* Update openclc.amazon.properties
Co-authored-by: Patrick Quist <partouf@gmail.com>
* Changes to allow Program (vs Unit) in Object Pascal
* add possibility of dpr
* more flexibility with pascal filenames
* lintfixes
* i have no idea what im doing
* apply changes to pascal-win
* pascal fixes
* pascal projectfile changes
* work in progress
* bugfixes
* bla
* bugfixes
* mostly working
Co-authored-by: paul mcgee <paul.mcgee.8@bigpond.com>
Co-authored-by: Paul McGee <paulmcgee1969@gmail.com>
* OCaml properties fixes
- Improve defaults by adding local and system versions
- Make no assumptions about whether local and system are the same
- Enable OPAM workflows which rely on updating PATH
- Fix version flag
- Fix objdumper
* OCaml output refactoring
* Add an arg parser for OCaml
Derived from Pascal (for now)
* Rename default OCaml compiler ids
* Add alias of old OCaml default compiler id
Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
A new compiler type 'win32-vc6' has been added, which uses a slightly
modified version of asm-parser-vc to handle assembly output differences
from current Visual Studio output.
In particular, MSVC6 does not output a comment line containing the
function's compile flags prior to the function body. The win32-vc parser
uses this to identify the start of a function and initialize
currentFunction. Instead, we use the regex that identifies a function
name to do this. Otherwise, a TypeError occurs trying to set
currentFunction.name when currentFunction is null.
In addition, MSVC6 only outputs a file comment once (presumably, until a
function from a different file is output). So instead of initializing
currentFunction.file to undefined, it is set to currentFile instead.
This should get set on the first function found in the file, but if not
it is initialized to undefined, so the behavior there would be the same.
Finally, the _DATA and _TLS segments are handled as well as some
additional miscellaneous directives.
Changes:
- ocaml.default.properties:
- add the relevant flags for execution and emitting binaries
- add nicer version number reporting
- let CE know `objdump` can be used on ocaml objects
- ocaml.js:
- update optionsForFilter for both executable and object handling
- override the getter for executable to work within ocamlopt context
* Extract device code from assembly files.
This commit by itself does not actually add any viewing panes for the
extracted device code, nor does it provide any means to provide
device-specific postprocessing steps.
* Add a rudimentary device view.
This doesn't handle multiple device outputs correctly at the moment, and
it provides no opportunity to view device code differently from
non-device code for now.
* Lint issues
* Some more WIP getting it working.
* Add device extraction code
* More fixes, and keep state
Co-authored-by: Joshua Cranmer <joshua.cranmer@intel.com>
Co-authored-by: Patrick Quist <partouf@gmail.com>