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>
When compiling to binary and with the demangling enabled, the assembler parser
was not correctly matching the "labels". The labelRe regex is tailored from
matching against the real symbol names, before any demangling. In the
binary+demangle context, we rely on objdump doing both at once, feeding our
parser with demangled names.
Make the labelRe match anything of the form:
00000000123af <every thing here is the label>:
fixes#3235
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Both gimple and original dumps are missing because CE currently only checks for
dumps coming from a pass advertised in -fdump-passes.
Fix this by faking 2 lines as coming from -fdump-passes.
fixes#3180
This is a fixed version of c8b25ee53b (#3183)
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Both gimple and original dumps are missing because CE currently only checks for
dumps coming from a pass advertised in -fdump-passes.
Fix this by faking 2 lines as coming from -fdump-passes.
fixes#3180
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
Refactors the handler for the AsmDocs API to reduce code duplication.
**Breaking changes proposed**
- API will now return 404. This used to return 200 with "Unknown opcode" which is what led to issue #3117. Following cases has been changed:
1. archiecture was not found
2. instruction opcode was not found
- API will now return 406 not acceptable when the accepted content type is not text or json
- There is no longer a `result` field on a 200 request, instead the assembly documentation object is returned.
- There is no longer a `found` field on any request, the HTTP codes indicate whether it was found or not (200 means found)
**New features**
- The frontend will only request the opcode for an instruction set at most once, caching every single outgoing request.
- The "There was an error fetching the documentation for this opcode" has been adjusted to contain what went wrong.
Relevant tests have been added and updated.
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>