root-project / cling

The cling C++ interpreter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switching to clang16

a-turko opened this issue · comments

Hi,

I was thinking about making Cling use a newer version of Clang (Clang 16) to improve support for C++20. I'm wondering what the complexity of this change would be.
Is this something you've looked into? What would be your estimate of the amount of work needed to do that?

It's definitely which we are looking for. Unfortunately most of LLVM upgrades are a lot of work. This is the PR to upgrade from LLVM 9 to LLVM 13: root-project/root#10294

And we are still fixing bugs, to release an new Cling version with LLVM 13. But there is also a lot of ongoing work to solve this problem in future. Clang-repl was created to move a lot of cling related development on the llvm and clang components to the llvm upstream. This should make the cling source code smaller, which makes easier to upgrade to a new llvm version.

Thanks @SimeonEhrig for the pointer to clang-repl. From what I read it seems that for use cases outside of High Energy Physics one could replace cling with clang-repl.
Can I assume that being a clang tool, clang-repl uses a JIT compiler that supports all C++ features supported by clang in the current version?

Thanks @SimeonEhrig for the pointer to clang-repl. From what I read it seems that for use cases outside of High Energy Physics one could replace cling with clang-repl.

Yes, that is the goal of clang-repl.

Can I assume that being a clang tool, clang-repl uses a JIT compiler that supports all C++ features supported by clang in the current version?

There is not guaranty but a good chance that a lot of the C++ features are working. Unfortunately clang-repl introduces sometimes new "bugs", because it's works principal with the translation units and how the repl interface is working. I suggest to simply test it and open an issue if it does work. This would help us a lot of.

Hey :)

I saw that the MR root-project/root#10294 has been merged. Any updates on the state here?

root-project/root#10294 is for llvm13 and from last year, so not related.

We have branched for ROOT's release, next is the llvm 16 upgrade in master. Afaik root-project/root#13815 is the only remaining issue; @hahnjo can state this with more authority.

just to post the link to the right PR for the upgrade to LLVM 16: root-project/root#13273

We merged the upgrade this morning! 🥳