compiler-explorer icon indicating copy to clipboard operation
compiler-explorer copied to clipboard

Support EDG

Open AaronBallman opened this issue 7 years ago • 13 comments

It'd be fantastic if compiler explorer had support for the EDG frontend as a target compiler.

AaronBallman avatar Jun 22 '18 13:06 AaronBallman

Hi! Thanks for suggesting interesting compilers to add to CE.

Unfortunately, if the EDG compiler you mention is https://www.edg.com/, their faq does not sound too good, both in price (https://www.edg.com/faq/price) and how the licensing would work.

If you have any more information, we would love to hear back

:)

AbrilRBS avatar Jun 23 '18 00:06 AbrilRBS

I would be happy to initiate a discussion with EDG to see if they have interest in the idea, if you'd be willing to do the integration. If you'd like, drop me an email (aaron at aaronballman dot com).

AaronBallman avatar Jun 23 '18 01:06 AaronBallman

I've just sent you an email. Please do answer to the CC'ed address :)

AbrilRBS avatar Jun 24 '18 13:06 AbrilRBS

CC @daveedvdv (we spoke privately a little about this).

mattgodbolt avatar Nov 05 '19 13:11 mattgodbolt

I'm pretty sure we'd be happy to provide you with a demo version (we provide it to lots of people — it uses C as an intermediate language). The main issue is that we don't have an open library to go with it. Linking with C code is not a problem, but something as simple as <iostream> needs work.

daveedvdv avatar Nov 12 '19 14:11 daveedvdv

FWIW, the way I've worked around this lack (and I suspect others have worked around it similarly) is to use ICC to get a rough idea of how EDG behaves. However, ICC is approaching it's end of life (https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.html) and so this solution isn't going to work for newer releases of EDG.

AaronBallman avatar Mar 23 '23 19:03 AaronBallman

FWIW, the way I've worked around this lack (and I suspect others have worked around it similarly) is to use ICC to get a rough idea of how EDG behaves.

Yes, but the problem with that workaround is that ICC-on-Linux uses something like EDG's --g++ option to work in GCC-compatible mode. That can be misleading if the code you're testing relies on some GCC extension/bug that EDG emulates perfectly in its GCC-compatible mode. One of the main benefits of using EDG is its strictness, which is weakened by asking it to act like GCC.

I would love libstdc++ to have a "no extensions" mode, where any functionality that depends on GCC extensions is disabled (or provided by a fallback implementation in pure C++) but that would be a lot of work.

jwakely avatar Jan 05 '24 12:01 jwakely

This issue can be considered fixed by #5486

Endilll avatar Jan 05 '24 12:01 Endilll

CE now supports EDG with --g++ and EDG with no standard library support. That still means you can't test any non-trivial C++ code except in GCC-compat mode.

So yes, this can probably be closed since "Support EDG" is now done ... but Daveed's comment still holds true: you can't really do much without a std::lib. But providing an EDG-compatible std::lib is out of scope for CE (we should probably address it upstream in GCC).

jwakely avatar Jan 05 '24 12:01 jwakely

Is it a correct summary of current state of things that out of two EDG compiler groups, EDG-GNU is EDG's --g++ mode, with GNU extensions and GNU standard library, while EDG-DEFAULT lacks any extensions, and not able to handle anything requiring the Standard library?

CC @DarkArc

Endilll avatar Jan 05 '24 12:01 Endilll

Is it a correct summary of current state of things that out of two EDG compiler groups, EDG-GNU is EDG's --g++ mode, with GNU extensions and GNU standard library

Yes.

while EDG-DEFAULT lacks any extensions, and not able to handle anything requiring the Standard library?

Yes. We have a very minimal library but nothing near a complete implementation.

All three major standard libraries currently require us to be in either Microsoft, GCC, or Clang mode to properly consume.

DarkArc avatar Jan 05 '24 14:01 DarkArc

Yes. We have a very minimal library but nothing near a complete implementation.

Do you imply that EDG default has library support headers (e.g. <initializer_list>)? If so, is there a list of headers available in this mode?

Endilll avatar Jan 05 '24 14:01 Endilll

We have our own (at least partial) implementation of the following headers:

  • compare
  • coroutine
  • edg_internal_defines
  • exception
  • initializer_list
  • new
  • source_location
  • stdexcept
  • stdfloat
  • typeinfo

They're really only intended to be used in the absence of a more complete standard library. They are available with the EDG Default mode compiler on Compiler Explorer.

DarkArc avatar Jan 05 '24 23:01 DarkArc