Commit Graph
429 Commits
Author SHA1 Message Date
Patrick Quist 27136f3e1d Clean trunk and execution (#2916) 2021-09-04 20:55:49 +02:00
HazandRubén Rincón Blanco b3628b2c31 OCaml Improvements: objdump and a few refactorings (#2913)
* 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>
2021-09-03 05:51:15 +02:00
Kevin Adler 44c5162add Add support for Microsoft Visual C++ 6 (#2907)
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.
2021-09-01 07:50:26 -05:00
Mats Larsen cfff740283 Fix execution for Java with multifile ui (#2882)
* Fix execution for Java with multifile ui

* Remove dev comment
2021-08-28 14:39:02 +02:00
Patrick Quist 5e5e60159a Multifile/IDE mode (#2725) 2021-08-26 21:57:07 +02:00
Matt Godbolt 019029c070 Support execution and binary mode in haskell. Closes #2854 2021-08-14 13:06:26 -05:00
Haz 60db8ba531 Make OCaml examples executable and objdumpable (#2853)
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
2021-08-14 13:03:13 -05:00
ca017bac31 Add support for heterogeneous compute (#2836)
* 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>
2021-08-14 12:53:22 -05:00
Haz 4d3750bef3 Override default compiler flags for OCaml (#2849)
Fixes github issue #2848
2021-08-11 23:02:21 +02:00
Patrick Quist 508d6045a3 lintfixes 2021-07-31 20:28:01 +02:00
Joachim Schmidt 4c0711be78 Update to latest zig trunk (#2832)
Unused function parameters (used in the custom panic handler) are now
compile errors.
2021-07-31 20:21:44 +02:00
Quinton Miller 7e1835fa0f Add support for Ruby (#2816) 2021-07-30 16:29:37 -04:00
Michał Cichoń 2930b0cec2 Add support for Intel asm syntax (#2824) 2021-07-28 22:36:33 -05:00
RabsRincon d6c5752852 Reassign my copyright to Compiler Explorer Authors 2021-07-27 06:03:54 +02:00
Michał Cichoń 3bce751739 Add support for Circle (https://www.circle-lang.org/) (#2808)
* Add support for circle-lang (closes #1845)
* Add circle-128 version.
* Support keywords starting with @ (thanks Matt!)
2021-07-25 21:26:00 -05:00
Mats Larsen aa431e1336 Add rustc MIR output view (#2795)
* Add Rustc MIR representation view
* Enable MIR view for rust-cg-gcc
2021-07-24 10:56:06 -05:00
Matt Godbolt 25f48a89a0 Reassign my copyright to Compiler Explorer Authors 2021-07-24 08:46:18 -05:00
RabsRincon db6626e3e8 Reassign my copyright to Compiler Explorer Authors 2021-07-24 00:51:34 +02:00
Matt Godbolt 625732bf73 cproc tweaks 2021-07-19 22:56:45 -05:00
Marc Poulhiès 040115eaf5 Support cproc C11 compiler (#2787)
Add support for cproc C11 compiler.
cproc is a lightweight compiler using the QBE backend.

Fixes #2755
2021-07-19 22:24:46 -05:00
Artem Belevich 115cbf3817 Add support for HIP compilation for AMD GPUs. (#2759)
* Added support for HIP compilation for AMD GPUs.

At the moment it only supports stand-alone compilation w/o ROCm SDK.

* Enable barebones HIP compilation.

Clang by itself is good enough to compile simple kernels that do not need ROCm
SDK headers and bitcode libraries.

Closes #2760
2021-07-19 21:55:23 -05:00
Marc Poulhiès f000d51ad0 Adding rustc-cg-gcc (#2746)
GCC backend for rustc is still in a very early state.
It is in the process of being merged in main rustc source:
https://github.com/rust-lang/compiler-team/issues/442

Currently reusing main rust compiler class and simply remove -Cllvm= argument if
any (only for intel asm syntax).

Disabling binary until the result is more friendly (currently binary are too
big).

refs #2683
2021-07-12 15:35:01 -05:00
Quinton Miller 6ea7669814 Override CC env variable in Crystal propeties (#2776) 2021-07-12 08:37:32 -05:00
partouf 2eebf0372f lint fixes 2021-07-08 14:40:41 +00:00
Quinton MillerandPatrick Quist 94ecb093a0 Add Crystal support (#2732)
* Add Crystal support

* Fix copyright

* Add ASM parser for Crystal

* Add supportsLibraryCodeFilter

* Update crystal-mode.js

* use baseName

* Force `square` call

* Update default snippet

Co-authored-by: Patrick Quist <partouf@gmail.com>
2021-07-08 00:23:48 +02:00
Mats Larsen f3be74183d Fix execution for JVM compilers (#2767) 2021-07-06 09:42:21 -05:00
Mats Larsen e2a8e7c8ce Support execution of programs for JVM compilers (#2745)
* Bare execution for Java programs
* Support execution for Kotlin
2021-07-06 08:11:32 -05:00
Rubén Rincón Blanco 78c0f67cab Config changes (#2764)
* Pass -g to TinyC by default

Closes #2748

* Sort C++ libs and tools alphabetically

* Sort C libs and tools alphabetically

* Add missing Zig C & C++ versions

* Enable semver for RISC-V Clang

Issue #2739

* Add missing RISC-V Clang 12.0

Issue #2739

* Improve RISC-V Clang config

* Improve C++ props file to make it more mantainable

* Add missing Zig C compiler id in compiler list

* Update etc/config/c++.amazon.properties

* Show different group name for each RISCV version
2021-07-06 05:21:56 +02:00
Rubén Rincón Blanco 27012bb0ec Initial sketch for how we could parse Rust output (#2761)
* Initial sketch for how we could parse Rust output

It has many issues, which I need to ask about, but ey, it works!

* Fix spacing

* Add tests for the new Rust output parsing
2021-07-06 05:21:31 +02:00
Oleksandr d1da148563 Add initial scala support (#2737)
* Add initial scala support

* Fix scala 3 compiler flags

* Use semver instead
2021-06-29 09:39:06 +02:00
Matt Godbolt a031ef9047 Fix up sandbox directory for interpreters 2021-06-26 16:44:19 -05:00
Rubén Rincón BlancoandMatt Godbolt 0fca6c8c0b Adds Zig-args (#2735)
* Adds Zig-args

This is the first Zig library added to the site, so this implementation
might be broken in unexpected ways

See issue #2525

* Update lib/base-compiler.js

Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2021-06-25 15:52:05 +02:00
Artem Belevich b939d1fe5b Added support for SASS disassembly for clang as a CUDA compiler. (#2728)
* Added support for SASS disassembly for clang as a CUDA compiler.

Clang `--cuda-device-only -c` produces the same kind of CUBIN output as `nvcc
-cubin` and can use nvdisasm to disassemble it.

* Enable SASS disassembly for clang as a CUDA compiler.
2021-06-21 20:47:46 -05:00
Rubén Rincón Blanco 9e2b24ea40 Add Zig c++ (#2716)
As requested by #2707

It still has the same problems found in #2434,
 which that will get fixed in Zig 0.8.1
2021-06-16 13:00:00 +02:00
Patrick Quist d604f06e26 exceptions for zig versions < 0.8.0 2021-06-09 22:04:54 +02:00
b4ebb47ac2 Add Kotlin/JVM support (#2637)
* Add Kotlin/JVM support

* Update CONTRIBUTORS.md

* Use kotlinc-jvm instead of kotlinc

* Fix alphabetical ordering

* Filter kotlin compiler arguments

Extract user options filtering for java into a separate function to
handle filtering options with extra arguments.
Filter kotlin compiler options: -d, -jdk-home, -kotlin-home, -script, -progressive

* Filter -Xjavac user options

Filter any option that starts with '-Xjavac', as it could be used to pass unwanted options through kotlinc to javac.

* Fix year in copyright

Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>

* Add kotlin.amazon.properties

* Add JAVA_HOME to kotlin default exec options

Query per-compiler property 'java_home' and set environment

* Add java_home to kotlin properties

Co-authored-by: Daniel Below <daniel.below@jetbrains.com>
Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
2021-06-02 22:58:41 +02:00
Matt Godbolt a4edf7ed6b No array for each 2021-05-28 18:08:05 -05:00
Matt Godbolt 5c5bc4dd50 Dont array push multiple times 2021-05-27 23:25:37 -05:00
Matt Godbolt 4e36d206b4 Prefer regex.test() 2021-05-27 23:19:32 -05:00
Matt Godbolt a465962ab3 explicit length check 2021-05-27 23:17:13 -05:00
Marc Poulhiès 64450523f2 mrustc: force crate_type to rlib (#2691)
Defaults to bin, which will complain when there is no main(). But at the moment
compiler explorer has no way to compile the resulting C and get an executable.
2021-05-27 22:47:22 +02:00
Marc Poulhiès b283b7eef3 Initial support for mrustc (#2681)
Add the needed base for new mrustc compiler.
https://github.com/thepowersgang/mrustc

mrustc is transpiling Rust to C and is mainly used for bootstraping rustc.

This change treats the C output as the final product (as is assembly for
GCC/clang). It is not easily possible to automatically plug this C to other C
compilers to get assembly or executable.

fixes #2643
2021-05-27 21:51:33 +02:00
Johan Engelen b00511ea10 LDC: use -gline-tables-only instead of -g by default (#2687)
This changes the default LDC compile flag from `-g` to `-gline-tables-only`, such that the LLVM IR output does not contain `call void @llvm.dbg.declare` calls that (I think) most users are not interested in.  The old behavior can be restored by the user by passing `-g` (I think users are much more familiar with the `-g` option than the `-gline-tables-only` option). Line information is preserved so users can still see what IR lines correspond to user code lines.
2021-05-27 20:14:25 +02:00
Patrick Quist b2ac544920 somewhat working delphi support (#2672) 2021-05-21 20:54:01 +02:00
Patrick Quist ab5e1df5d9 Update gccrs.js 2021-04-30 20:29:13 +02:00
Marc Poulhiès 92fb7ee4df Create GCCRSCompiler class from GCCCompiler (#2632)
Use default GCCCompiler values for GCCRS.
2021-04-30 20:16:04 +02:00
partouf 6bad75e8a6 fix #2623 2021-04-30 16:03:41 +00:00
Rubén Rincón Blancoandpartouf a330cd97f9 Add Zig cc as a C compiler (#2434)
* Add Zig cc as a C compiler

This commit is currently untested - I have no way to do it locally
 (Even though installing Zig is awesomely simple!), so it might be
 pretty broken

Releated issue: #2427

* Move cc to options field

This way fstat works

* attempt at fixing zigcc

* force zig > 0.6 to compile to binary as workaround

Co-authored-by: partouf <partouf@gmail.com>
2021-04-30 16:36:54 +02:00
Matt Godbolt 1d7455e1d5 Re-enable java. Closes #1438 2021-04-26 21:18:15 -05:00
Matt Godbolt b934d999d9 Keep go asm in UPPERCASE. See #2620 2021-04-26 18:34:16 -05:00